Commit graph

97 commits

Author SHA1 Message Date
Ivan Butygin
a40c6c7fd2
Make LDC custom passes available to jit, add API for jit compiler options (#2758) 2019-09-08 09:16:05 +03:00
Johan Engelen
46ab03362f Fix compilation with LLVM trunk (TerminatorInst has been removed from Instruction class hierarchy) (#2899) 2018-11-04 19:27:22 +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
Ivan
321e5eab51 add stripPointerCasts() 2018-06-19 22:18:18 +03:00
Ivan
d02025d269 Fix gc2stack pass 2018-06-18 21:35:46 +03:00
Johan Engelen
95b454d2bd Fix compilation with current LLVM trunk. (#2722) 2018-06-03 01:30:27 +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
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
David Nadlinger
747f7a3dfa clang-format files touched in d01a91f7 [nfc]
Some housekeeping on files that recently saw large changes anyway.
2017-05-24 21:35:40 +01:00
Martin
d01a91f755 Allow multiple occurrences for almost all command-line flags
Except for `-sanitize` and `-cache-prune*`.
2017-05-23 20:53:57 +02:00
Rainer Schuetze
ae7f1a7f2c fix buildinng against LLVM master (#2111) 2017-05-16 20:43:29 +02:00
Johan Engelen
6720039168 LLVM 5.0: paramHasAttr first argument meaning changed (minus 1)
See http://llvm.org/viewvc/llvm-project?view=revision&revision=300367
2017-04-20 00:07:19 +02:00
Johan Engelen
64df1687a8 Fix LLVM 5.0 compilation. 2017-04-14 12:55:19 +02:00
David Nadlinger
52445d617b gen: Prefer nullptr [nfc] 2016-09-03 14:38:10 +01:00
Martin
a5e5bd1716 Keep _d_newclass() semantics, re-introduce _d_allocclass() instead
And use that one in DtoNewClass(), keeping 3rd party code from breaking.
2016-08-15 13:19:11 +02:00
Martin
71912511a5 Adaptations for recent LLVM 3.8 master changes 2015-11-08 14:06:16 +01:00
David Nadlinger
9df487edff gen/ir: clang-tidy the world 2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615 driver/gen/ir: clang-format the world
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
David Nadlinger
0b4bcbc28c Merge pull request #1181 from kinke/attribs
Simplify working with LLVM attributes
2015-11-01 17:52:45 +02:00
Martin
90197d6c72 Simplify working with LLVM attributes 2015-11-01 16:19:27 +01:00
Martin
2d959ea540 Make use of C++11 range-based for
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
Martin
60d676e2a1 Drop support for LLVM < 3.5
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
kai
f691638956 LLVM 3.7: Yet another DataLayout fix. 2015-03-15 18:08:38 +01:00
kai
66bf03b96b LLVM 3.7: DataLayoutPass is gone.
DataLayout is now non-optional at the module. Therefore
there is no need for a separate DataLayoutPass.
2015-03-06 17:13:00 +01:00
Martin
e7bfb78632 Refactor attributes system.
By introducing abstractions for attribute builder and set since they differ
greatly between LLVM 3.1-3.3.
2015-02-23 22:52:11 +01:00
kai
441c98532c Add changes related to the llvm::Metadata refactoring in LLVM 3.6.
In LLVM 3.6, the llvm::Metadata hierarchy is distinct from the llvm::Value hierarchy.
This refactoring causes several changes.
2014-12-25 19:02:15 +01:00
kai
78ba3eccc9 Fix a LLVM 3.6 compile error.
llvm::SmallSet::insert() now mimics the STL.
2014-11-26 21:23:33 +01:00
Alexey Prokhin
50f729d415 Use _d_newarrayU instead of _d_newarrayvT 2014-08-22 16:01:34 +04:00
Kai Nacke
25b7e55ae0 Fix LLVM 3.5 build 2014-05-15 19:49:36 +02:00
kai
52fcf51a6c Try to fix the LLVM 3.5 build 2014-03-11 19:10:24 +01:00
kai
2f2fa92df3 Fix includes for LLVM 3.5 2014-03-07 06:40:39 +01:00
Kai Nacke
a39e5582e6 DLL linkage is decoupled from linkage in LLVM 3.5. 2014-01-19 11:02:27 +01:00
Kai Nacke
c14e065138 Fix the LLVM 3.5 build.
Some classes were moved into IR folder.
2014-01-13 17:08:43 +01:00
Kai Nacke
74630ed7f1 Simplify LLVM passes.
Use a typedef to minimize difference between LLVM 3.1 and Â3.2+.
Use IRBuilder method CreateMemCpy.
2013-12-16 15:00:00 +01:00
Kai Nacke
76199638c1 Fix null pointer derefence in LLVM 3.5 2013-12-05 08:40:04 +01:00
Kai Nacke
37ee9962fd Changes for LLVM 3.5 2013-11-27 22:44:49 +01:00
David Nadlinger
9f1c26b52a gc2stack: Handle _d_allocmemory.
This allows us to clean up after inlining closures.
2013-10-27 17:05:19 +01:00
David Nadlinger
3539e201f8 gc2stack: Move TypeInfo handling code into FunctionInfo subclass.
This is to properly support calls that don't involve TypeInfo
at all, like it is already the case for _d_newclass, and will be
for _d_allocmemory.
2013-10-27 17:05:19 +01:00
David Nadlinger
5b9208ef85 gc2stack: Extract static size checking code into helper function. 2013-10-27 17:05:19 +01:00
David Nadlinger
e1a6d8144b gc2stack: Replace return type bool with proper enum flag.
This makes the code much easier to read.
2013-10-27 15:43:12 +01:00
David Nadlinger
27b4f730aa gc2stack: Remove unused safeToDelete mechanism. 2013-10-27 15:36:14 +01:00
kai
a73e4602ee Simplify EmitMemSet in GarbageCollect2Stack.
Simply take advantage of the predefined `CreateMemSet()` function.
2013-10-25 23:28:29 +02:00
Kai Nacke
e5fe110280 Merge pull request #526 from klickverbot/newclass-signature
Correct signature of _d_newclass runtime call.
2013-10-23 21:43:11 -07:00
David Nadlinger
1f59740524 _d_allocclass -> "_d_newclass".
The define is a leftover from the times when we supported
both D1 and D2.
2013-10-24 00:25:36 +02:00
David Nadlinger
3d8e2e5e5c Add virtual destructor to GarbageCollect2Stack to silence GCC warning. 2013-10-24 00:24:55 +02:00
David Nadlinger
36b70b68e8 Do not generate invalid IR in dgc2stack pass.
Branching to a block that starts with a landing pad
instruction is illegal.

GitHub: Fixes #524.
2013-10-23 22:53:18 +02:00
David Nadlinger
43e27d0dd1 Remove USE_METADATA.
It has been on by default for quite some time now.
2013-06-07 02:48:53 +02:00
David Nadlinger
9fbad3c4ba Removed tautological checks.
They were probably used during initial development of the
pass to be able to disable emission of the global reference
by setting TD_TypeInfo to -1.
2013-06-07 02:45:44 +02:00
David Nadlinger
af699bd76e Rename TD_Confirm to TD_TypeInfo.
The old name probably was a reference to the fact that the
metadata node is used to _confirm_ that a metadata record
found by name really belongs to a given TypeInfo instance,
but I found it to be rather non-intuitive.
2013-06-07 02:41:10 +02:00
David Nadlinger
c02b38fe9a Removed LLVM 3.0 compatibility code.
There might be still some pieces left here and there, and
there is certainly code that could be rewritten in a nicer
way with the 3.0 requirement out of the picture.
2013-05-31 20:48:38 +02:00