Martin Kinkelin
d140f2a283
Skip superfluous IR pointer bitcasts, now that they are always opaque
2024-05-20 16:45:09 +02:00
Martin Kinkelin
e7091dd0c7
Drop support for LLVM < 14
...
LLVM 14 is the first version supporting both new pass manager and
opaque IR pointers.
2024-05-12 03:53:03 +02:00
Martin Kinkelin
9041c0bf67
Adapt to free functions in dmd
C++ namespace now
2024-03-03 19:14:00 +01:00
Martin Kinkelin
143d7b3171
Fix compile & link errors against LLVM 14
2022-03-30 13:51:18 +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
Nicholas Wilson
1568d0cdca
Fix compilation with LLVM 14 ( #3822 )
2021-09-17 16:41:49 +02:00
Martin Kinkelin
369cfd13ce
Adapt to TY enum class
2021-09-07 16:51:19 +02:00
Martin Kinkelin
a9aafac862
Glue layer: Make all mutable Loc &
params const
2020-12-13 15:01:19 +01:00
Martin Kinkelin
424064438e
Fix ICE wrt. inline IR and empty parameter types tuple ( #3509 )
2020-07-16 21:17:53 +02:00
Martin Kinkelin
834f666ce5
Raise min LLVM version to 6.0 ( #3493 )
2020-07-13 20:42:50 +02:00
Martin Kinkelin
18466551a0
Don't crash after inline IR parsing failure
...
Tested by fail_compilation/ldc_llvm_inline_ir_3.d.
2020-04-28 01:37:49 +02:00
Fangrui Song
0a007a55f8
Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) ( #3305 )
2020-02-01 02:52:35 +01:00
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
e52199469f
Upgrade front-end & libs to v2.087.0-beta.1
2019-06-21 15:39:45 +02: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
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 ( #2872 )
2018-10-15 22:31:59 +02:00
Martin Kinkelin
44074e3616
Fix issue #2729 - dump static array inline-IR results to memory ( #2732 )
2018-06-08 15:55:48 +02:00
Martin
197e65efde
Merge branch 'master' into merge-2.078
...
Conflicts:
driver/main.cpp
gen/cl_helpers.h
gen/declarations.cpp
runtime/druntime
tests/d2/dmd-testsuite
2018-01-20 11:20:17 +01:00
Ivan Butygin
bed3309353
Extend LDC_inline_ir pragma ( #2433 )
2018-01-16 22:08:31 +03:00
Martin
cfad799f48
Merge 2.078.0 front-end and stdlibs
2018-01-06 01:39:18 +01:00
Martin
2616261fd2
Revise all LDC-specific errors/warnings/deprecs and insert backticks
...
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
1fb269f940
Drop support for LLVM < 3.7
2017-07-16 02:18:00 +02:00
Johan Engelen
3cc0c3cba4
Remove dependence on std::to_string, because it is not available on all systems. ( #2147 )
...
This PR should enable native compilation on Android.
2017-06-05 17:50:13 +02:00
Martin
383c2d3a59
Range-ify usages of front-end Arrays
2017-06-04 00:29:44 +02:00
Rainer Schuetze
ae7f1a7f2c
fix buildinng against LLVM master ( #2111 )
2017-05-16 20:43:29 +02:00
Johan Engelen
64df1687a8
Fix LLVM 5.0 compilation.
2017-04-14 12:55:19 +02:00
Johan Engelen
9e394e4f99
Fix LLVM 5.0 build. ( #2050 )
...
llvm::AttributeSet was renamed to llvm::AttributeList
2017-03-29 22:26:17 +02:00
Martin
7a0bba00d9
Fix in-place construction of structs returned by inline assembly
...
Fixes #1823 .
2016-10-11 22:10:30 +02:00
Johan Engelen
b70042a85e
LLVMContext::setDiscardValueNames(true) when not compiling to textual IR.
...
Resolves #1749
2016-09-14 12:34:58 +02:00
Martin
e9ac0a7d2b
Set DataLayout for inline-IR modules
...
This gets rid of LLVM warnings when linking the IR module into the main
one.
2016-08-21 14:26:54 +02:00
Martin
fc2523aa46
Fix issue #1711
2016-08-21 14:26:23 +02:00
David Nadlinger
6cc93bc8ba
gen/ir: Move function body codegen state into separate class
...
Previously, the transitory state only needed and valid during
generation of the LLVM IR for the function body was conflated
with the general codegen metadata for the function declaration
in IrFunction.
There is further potential for cleanup regarding the use of
gIR->func() and so on all over the code base, but this is out
of scope of this commit, which is only concerned with those
IrFunction members moved to FuncGenState.
GitHub: Fixes #1661 .
2016-08-03 21:07:18 +01:00
Martin
0c0c1ecaf5
Rename DVarValue to DLValue
2016-06-13 22:30:15 +02:00
Martin
963a10b225
Let DValue types handle memory-only types consistently
...
I.e., disallow memory-only values from being represented as DImValues
and disallow getRVal() for such types instead of returning the address.
2016-06-13 22:30:14 +02:00
Martin
039560bd83
Introduce DtoRVal/DtoLVal convenience functions
...
No functional changes intended.
2016-06-13 22:30:13 +02:00
Johan Engelen
9955d8e4e4
For LDC_inline_ir
functions: instantiate a new "alwaysinline" function for each call, which is the current behavior for inline ASM too.
...
When certain attributes are applied to the calling function, like "unsafe-fp-math", the inlined inlineIR function has to have the same attributes otherwise the calling function attribute will be reset to the safe merge of the two: "false". Because the same inlineIR function can be called in different functions using an alias definition, a new function (with possibly different attributes) has to be instantiated upon every call.
Related GH issue #1438
2016-04-21 10:16:33 +02:00
Kai Nacke
763b196a72
Merge remote-tracking branch 'origin/master' into merge-2.070
2016-03-24 22:40:31 +01:00
Martin
88dcb4349a
Refactor setting linkage type and COMDAT
2016-03-20 16:37:44 +01:00
David Nadlinger
90c213b52e
Adapt to changed StringExp API
...
Not tested yet. There is also quite a bit of potential for
further cleanup of the glue layer string manipulation code.
2016-02-14 19:35:40 +01:00
Johan Engelen
69595d41e7
Fix building against LLVM trunk
2015-12-18 13:07:32 +01:00
Rainer Schuetze
f5e99a53aa
fix building against LLVM master
2015-12-08 20:17:32 +01:00
Martin
eacc5ee303
Adapt to recent LLVM 3.8 change
2015-12-04 14:18:31 +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
Martin
90197d6c72
Simplify working with LLVM attributes
2015-11-01 16:19:27 +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
cf8875fad1
Fix for issue #988 .
...
Starting with LLVM 3.7, linkage and COMDAT are 2 different concepts.
This means that LinkageODROnce does not put the object into a COMDAT.
On Windows this resulted in linker error messages.
This PR places all template functions, TypeInfo objects and other
objects into a COMDAT.
2015-09-09 16:46:49 +02:00
David Nadlinger
0922254dd1
Directly emit IR into same llvm::Module instead of using Linker
...
GitHub: Fixes #970 .
2015-06-14 21:36:35 +02:00