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
David Nadlinger
0a376b9c71
Avoid unnecessary memset when allocating array literals.
...
This completes the merge of pull request #294 . Thanks a lot to
Chris Holdsworth who originally wrote the patch!
GitHub: Fixes #294 .
GitHub: Fixes #141 .
2013-05-04 21:20:09 +02:00
kai
1e4a8fffc2
Remove DMDV1 and DMDV2.
2013-03-06 10:20:24 +01:00
kai
a11459bc31
"The Great Renaming" continues.
...
More changes to match the renamed files of LLVM 3.3.
2013-01-06 17:17:30 +01:00
kai
272e7b7a55
Follow "The Great Renaming" in LLVM 3.3
...
This time VMCore was renamed to IR. Several top level include
files were moved to new subfolder IR.
2013-01-03 08:52:23 +01:00
Evangelos Foutras
984207e348
Fix llvm/IRBuilder.h include when using LLVM 3.2
2012-12-25 04:58:25 +02:00
David Nadlinger
8880645bf6
Typo fix.
...
Turns out I still had USE_METADATA=OFF in the CMake cache when
testing the previous commit.
2012-12-24 02:22:40 +01:00
David Nadlinger
a0971b7c4b
Use more portable integer log from LLVM.
2012-12-24 02:05:06 +01:00
David Nadlinger
8094e3c21b
dgc2stack: Added size limit for stack promotion.
2012-12-23 21:20:55 +01:00
kai
5f37ae30cf
LLVM 3.3: class Attributes is renamed to Attribute.
...
Some other renamings took place in "llvm/Attributes.h" but only this causes
compile errors in LDC.
Also uses new location of "llvm/IRBuilder.h".
2012-12-21 17:32:17 +01:00
David Nadlinger
7be9c5c5c7
dgc2stack: LLVM 3.2 compatibility.
2012-12-20 23:52:25 +01:00
David Nadlinger
8913898b5e
dgc2stack: Demote LLVM "tail" calls when promoting an allocation.
...
Referencing alloca'd memory in tail calls is invalid IR. This was
not caught by the verifier, but produced misoptimizations due to
wrong alias analysis results.
2012-12-20 23:52:25 +01:00
David Nadlinger
bc541a4421
Added D2/druntime support to gc2stack.
2012-12-20 23:52:25 +01:00