Nicholas Wilson
7f0e7e5e13
Remove getContainedType
from GC2Stack.cpp
( #4151 )
2022-09-13 19:25:51 +08:00
Nicholas Wilson
1ba58141ae
Remove use of getPointerElementType
from GC2Stack ( #4113 )
...
Augment the type info for arrays to include the element type in addition to the array type as a second type-as-metadata MDNode.
Use this in place of looking up the element type from the array type
2022-09-06 02:33:39 +00:00
Nicholas Wilson
543401d98f
Factor out legacy implementation details from Custom passes ( #3977 )
2022-05-08 14:43:54 +08:00
Martin Kinkelin
bdef01e7cc
Raise min LLVM version to 9.0
2022-04-25 23:11:48 +02:00
Martin Kinkelin
8527b3f9c8
Work around llvm::PointerType::getElementType() being deprecated in LLVM 14
2022-03-30 19:53:47 +02:00
Nicholas Wilson
4349388563
Prepare for LLVM15: Headers, attributes ( #3936 )
...
`llvm::AttrBuilder` was changed to require an LLVMContext in its constructor, and can no longer be copied.
declare `DEBIG_TYPE` after includes for the GC2Stack pass as `llvm/Support/GenericDomTreeConstruction.h `(included from `llvm/IR/Dominators.h` `#define`s and `#undef`s it.
`llvm::DIBuilder::createExpression` now takes an `ArrayRef<uint64_t>` instead of `int64_t`. EmitLocalVariable has similarly changed
2022-03-11 16:38:49 +01:00
Martin Kinkelin
e9f40d8a1a
Adapt to removed custom (de)allocators
2021-09-07 16:51:19 +02:00
Martin Kinkelin
d91cdb4111
GitHub Actions: Bump Ubuntu to 18.04
2021-06-05 13:42:01 +02:00
Martin Kinkelin
30921a989d
Simplify TypeInfo metadata
...
Don't store and check a back reference to the TypeInfo global.
The association is already unambiguously expressed by the metadata name
ending with the mangled name of the TypeInfo global.
Removing this check fixes a problem when replacing a TypeInfo global at
some point via IRState::setGlobalVarInitializer() (e.g., for the
rt.util.typeinfo unittests), because llvm::ValueAsMetadata doesn't fully
support LLVM's replace-all-uses-with.
2020-10-25 17:06:16 +01:00
Martin Kinkelin
1d969cfcca
Revise IRScope refactoring
...
LLVM already provides suited RAII helper types to restore the IRBuilder
state. [They sadly aren't movable, so I've had to wrap them in a
unique_ptr.]
While at it, also minimally revise debuginfo generation for functions.
2020-09-26 01:04:50 +02:00
Martin Kinkelin
7544a97475
Fix LLVM < 8 compatibility (no llvm::CallBase)
2020-09-26 01:04:50 +02:00
Martin Kinkelin
96b9cde428
Add support for LLVM 11
...
One major change is the removal of llvm::CallSite, which I've replaced
by llvm::CallBase*.
2020-09-26 01:04:50 +02:00
Martin Kinkelin
834f666ce5
Raise min LLVM version to 6.0 ( #3493 )
2020-07-13 20:42:50 +02:00
Martin Kinkelin
40dedab1e8
Move TypeInfo_Struct emission to new ir/irstruct.cpp
...
Incl. getting rid of the dependence on an associated
TypeInfoStructDeclaration, which was only really needed for the mangled
name of the global.
Also slightly revise metadata generation.
2020-07-03 21:52:55 +02:00
Roberto Rosmaninho
a1e44b2c81
Adapt to current LLVM 10 ( #3257 )
2019-12-16 22:23:43 +01:00
Martin Kinkelin
030123410a
Add support for LLVM 9.0.0
...
Including some of Nicholas' fixes in #3144 .
2019-09-25 03:42:18 +02:00
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