Commit graph

504 commits

Author SHA1 Message Date
Martin Kinkelin
1f5c442519 Revise recent adaptations to frontend refactorings 2020-01-06 17:01:31 +01:00
Martin Kinkelin
4ac7f0554b Adapt to frontend refactorings 2019-12-22 16:29:45 +01:00
Martin Kinkelin
8fd69da8fb Make all DtoGEP helpers use implicit inbounds
Single functional change: always emit inbounds when computing the base
pointer of a SliceExp.
2019-09-10 22:36:25 +02:00
Martin Kinkelin
d4fa4710e0 Don't emit DMD-style tracing with pragma(LDC_profile_instr, false)
E.g., this disables it for __entrypoint.d (the C main function(s) in
there), which is required.

A wmain on Windows is not detected as FuncDeclaration.isCMain() yet,
that should be fixed too.
2019-08-08 22:38:38 +02:00
Martin Kinkelin
d93087ad90 Emit fatal codegen error for unsupported dual-context for now
As long as dlang/dmd#9282 isn't ported to LDC.
2019-07-29 20:13:59 +02:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
cc336d6df1 Support generic ldc.attributes.llvmAttr UDAs for function parameters 2019-03-31 20:59:54 +02:00
Martin Kinkelin
1fdf330346 Refactoring: Remove obsolete AttrBuilder wrapper
It was useful when we still supported older LLVM versions, but it's
obsolete now.
2019-03-31 19:18:56 +02:00
Martin Kinkelin
306bda36fd Adapt to latest LLVM 8 changes 2019-03-02 19:54:36 +01:00
Martin Kinkelin
5e93ed0dfd Upgrade front-end & libs to v2.085.0-beta.1 2019-03-01 18:19:00 +01:00
Johan Engelen
0a84988d65
Enable pragma(LDC_extern_weak) on function declarations. (#2984)
Enable pragma(LDC_extern_weak) on function declarations.
2019-01-27 14:44:31 +01:00
Johan Engelen
d2ff275678
Fix glaring mistake in #2983 (#2985) 2019-01-27 14:43:13 +01:00
Johan Engelen
354e45737b
Support LLVM 9 (trunk) (#2983)
* LLVM 9: fix sanitizer pass renaming

* Add LLVM 9 to intrinsics in druntime

* LLVM 9: fix commandline option change from `-disable-fp-elim` to -frame-pointer=`

Resolves issue 2980
2019-01-25 17:58:26 +01:00
Martin Kinkelin
f5a5324773
Merge pull request #2946 from kinke/merge-2.084
Upgrade front-end & libs to v2.084.0
2019-01-18 19:48:47 +01:00
Nicholas Wilson
f5ae8311cd
Adapt to using SPIR-V support as an external library (#2935)
Adapt to using SPIR-V support as an external library.
2019-01-18 14:51:48 +08:00
Martin Kinkelin
c57e597323 Support both CRT ctor and dtor pragmas for a single function 2019-01-06 21:14:40 +01:00
Martin Kinkelin
32ecbdd266 Upgrade front-end & libs to v2.084.0-beta.1 2018-12-18 02:31:57 +01:00
Martin Kinkelin
deaaab8cf3
-fvisibility=hidden: Only hide function *definitions*, don't touch declarations (#2923) 2018-12-03 20:59:59 +01:00
Andrey Penechko
7bcd6d34dd Add option '-fvisibility=<hidden|default>' able to hide symbols not marked as 'export' on non-Windows targets. Resolves #2431 (#2894) 2018-11-09 20:55:57 +01:00
Martin Kinkelin
4a23399236 Aim for consistent #includes (order + dir prefix)
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 2018-10-20 16:19:46 +02:00
Elie Morisse
02eb4058fa Debug info: create temporary forward subprograms before creating the subprogram type
This is for the special case of auto functions returning a nested type, e.g:

  auto foo() {
    struct S {};
    S s;
    return s;
  }
2018-10-15 23:10:18 +02:00
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Martin Kinkelin
9fe95daeea Improve diagnostics for multiple function decls with IR type mismatch 2018-08-18 20:41:41 +02:00
Martin Kinkelin
7461269af4
Merge pull request #2773 from kinke/uda
Add @naked UDA
2018-07-28 17:46:59 +02:00
Martin Kinkelin
c10cf86403 Add @naked UDA
Adding the LLVM `naked` function attribute and disabling LDC's
prologue/epilogue too.
2018-07-27 22:53:55 +02:00
Martin Kinkelin
4d5871a027
Fix overzealous check for multiple main() functions (#2778) 2018-07-19 21:18:50 +02:00
Martin Kinkelin
c536910cb3 Bail out when trying to take address of intrinsic
Incl. overloaded aliases.
2018-06-26 23:10:13 +02:00
Ivan Butygin
cbeb2b45d6
@dynamicCompileEmit attribute (#2747) 2018-06-26 21:59:02 +03:00
Martin Kinkelin
a133ffad56 MSVC: Port Rainer's upstream extern(C++) method ABI fixes
From https://github.com/dlang/dmd/pull/8330.
2018-06-19 20:13:02 +02:00
Martin Kinkelin
3ca43c51b8
Use IndirectByvalRewrite for non-POD args and extern(C++) on Posix (#2728)
Fixing one aspect of issue #2702; not tackling the different destruction
rules yet.
2018-06-19 20:09:35 +02:00
Martin Kinkelin
29d609d63d Refactoring: Introduce TargetABI::reverseExplicitParams() 2018-05-30 22:42:00 +02:00
Martin Kinkelin
92913d4c08 Store front-end D function type in IrFuncTy
As we do for IrFuncTyArg. We'll need access to the front-end linkage for
the Posix ABIs too in order to implement indirect-by-value passing of
non-PODs for `extern(C++)`.
2018-05-30 22:41:48 +02:00
Martin
d8f60d2f5c Redirect access to object.d type declarations through gen/runtime
Not all type declarations yet (e.g., some TypeInfo subtypes are still
accessed directly), but those already wrapped as LazyType in the
gen/runtime.cpp module (with check and proper error msg in case object.d
doesn't contain a required declaration).
2018-04-04 19:59:10 +02:00
Martin
1b8a3b9d7d Adapt to frontend injecting implicit 'return 0' for betterC main
This fixes lit-test codegen/betterC_typeinfo.d.
2018-02-25 01:25:37 +01:00
Martin
c6132508b1 Don't waste an alloca for the nested context argument
And so get rid of all loads too; just use the untouched pointer argument
directly.
2018-02-11 18:43:02 +00:00
Johan Engelen
1da088330d
Add basic clang-like support for XRay, through -fxray-instrument and -fxray-instruction-threshold=. (#2465)
Currently only fully working on Linux.
See https://llvm.org/docs/XRay.html
2018-01-23 22:06:05 +01:00
Johan Engelen
3ec79179b4 PGO: refactor such that there can be IR-based and frontend-based PGO. 2018-01-15 23:59:14 +01:00
Johan Engelen
f2d9ff3424
Add DMD-style function trace profiling. (#2477) 2018-01-14 22:22:59 +01:00
Martin Kinkelin
11dfc4b5d7
Get rid of dead code (arrayops + DtoCallFunction() overload) (#2500) 2018-01-14 00:02:42 +01:00
Martin Kinkelin
ca6472c3b0
Don't eliminate frame pointer by default at -O0 (#2483)
Fixes issue #2480.
2018-01-13 13:49:10 +01:00
Martin
27deb2ff8c Get rid of obsolete gen/llvmcompat.h
Not needed anymore since C++11.
2018-01-12 20:20:47 +01:00
Martin
213de9b2f7 Merge branch 'master' into merge-2.077
Conflicts:
	runtime/druntime
2017-11-26 18:26:32 +01:00
Ivan
c839e9dfd0 Rename functions 2017-11-09 21:59:26 +03:00
Ivan
5426ffbd3d rename compiler files 2017-11-09 21:51:13 +03:00
Ivan
33c6cbb807 Renaming 2017-11-09 21:29:32 +03:00
Martin
ad89009d6e Merge 2.077.0 front-end and stdlibs 2017-11-05 18:41:55 +01:00
Ivan
044dd7bc9d Fix typo 2017-11-02 20:22:52 +03:00
Ivan
ae4db7d3b3 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-11-01 22:24:27 +03:00
Martin
183f97cd4e Objective-C: Fix functions with selector (issue #2387) 2017-10-26 17:01:02 +02:00