Commit graph

80 commits

Author SHA1 Message Date
Martin Kinkelin
0c1623c1a0 Replace getVoidPtrType() 2024-07-18 23:21:10 +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
liushuyu
fc4d884d2d
Multiple changes ...
* Use getVoidPtrType helper
* Replace #define with constexpr
2024-03-26 14:48:36 -06:00
liushuyu
b8a96faf92 tree-wide: port LDC to LLVM 18 2024-03-26 14:45:35 -06:00
Martin Kinkelin
d6d79187e6 Merge fix: Adapt to removed error/warning members 2023-11-06 01:10:16 +01:00
Martin Kinkelin
9ce57807c0 Drop support for LLVM 9 and LLVM 10 2023-07-29 01:12:43 +02:00
Johan Engelen
3e2156fa68
Don't output files on LLVM errors. (#4425)
Fix issue where an LLVM error or warning during IR passes (e.g. --fwarn-stack-size) does not abort outputting files. The object file would be added to the cache, and subsequent repeated LDC
execution would fetch the object file from the cache, effectively swallowing the error.
2023-06-16 00:26:07 +02:00
Johan Engelen
6151310b0e
Count all LLVM errors and warnings, fixes -w for LLVM warnings. LLVM >= 13 (#4384) 2023-04-29 09:45:30 +02:00
Martin Kinkelin
7d3f5bae2a
Fix regression with LLVM 13+: some errors in inline assembly don't stop compilation (#4331)
Based on Luís' #4302; fixes #4293.
2023-02-26 13:01:42 +01:00
Johan Engelen
8edd8de439
Add --fno-discard-value-names : Do not discard value names in LLVM IR (#4012) 2022-07-23 12:06:44 +02:00
Johan Engelen
a2ce3f31b2
Enable output of variable names in ASan and MSan error reporting. (#4004) 2022-06-26 11:13:33 +02:00
Martin Kinkelin
bdef01e7cc Raise min LLVM version to 9.0 2022-04-25 23:11:48 +02: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
Martin Kinkelin
406e469e99
Merge pull request #3832 from kinke/fix_compilability
Fix little compilability regression
2021-09-18 02:39:40 +02:00
Nicholas Wilson
1568d0cdca
Fix compilation with LLVM 14 (#3822) 2021-09-17 16:41:49 +02:00
Martin Kinkelin
86f430c039 Slightly revise frontend diff
E.g., preferring local imports for less merge conflict potential.
2021-09-11 17:34:51 +02:00
Martin Kinkelin
bfa3cead08 Upgrade frontend & libs to early v2.097.0 (dlang/dmd@cb0457daf3) 2021-05-29 00:19:22 +02:00
Hiroki Noda
a8d98fc054
Use new OpenFlags enumeration (#3710)
[This](https://reviews.llvm.org/D101506) drops old deprecated
OpenFlags support.
OF_{Append,None,Text} has been available since LLVM 9.

- https://reviews.llvm.org/rG1f67a3cba9b09636c56e2109d8a35ae96dc15782
2021-05-01 00:43:45 +00:00
Martin Kinkelin
d8bc064cfb Add support for LLVM 12 2021-02-12 07:54:41 +01:00
Martin Kinkelin
2172c605b4 Add support for -makedeps[=<filename>]
And streamline implicit -singleobj with DMD, also enforcing it when
compiling a *single* module *and* specifying the -of name.
[-makedeps currently depends on -singleobj.]
2021-01-07 15:55:00 +01: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
Roberto Rosmaninho
6274217c39
Add -output-mlir and prepare for MLIR emission (#3313) 2020-05-22 12:31:24 +02:00
Martin Kinkelin
1efbb4ff44 Revamp rt.sections_android, getting rid of some magic symbols
This should resolve #3350 and also gets rid of the previous Android-
specific requirement wrt. having a D main *and* making sure that object
file is the first one fed to the linker.
2020-03-17 16:44:05 +01:00
Martin Kinkelin
4629f156a7 Extend inline asm diagnostics by D source location 2020-02-25 02:31:58 +01:00
Martin Kinkelin
82f6d4fb85
Embed linker directives in ELF and Mach-O object files (#3259)
Resolves #3245 by adding `pragma(lib, <name>)` library names to
`llvm.dependent-libraries` for ELF object files.

For Mach-O, embed appropriate linker options for `pragma(lib)` and
support generic `pragma(linkerDirective, <flag>, ...)` as well.
2020-01-14 23:12:55 +01:00
Hiroki Noda
4734d2d878 Remove _d_execBss{Beg,End}Addr, used for copy-relocation check (#3247)
I think we can remove the copy-relocation logic since
9b97ede74f
was comitted.
2019-12-20 16:56:20 +01:00
Martin Kinkelin
211682e710
Fix issue #3221 (@assumeUsed on global union) (#3222) 2019-11-11 20:56:33 +01:00
Martin Kinkelin
262d4e2393 Upgrade front-end & libs to v2.089.0-beta.1 2019-10-18 20:55:13 +02: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
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
c193ad8047 Upgrade to v2.083.0 2018-11-02 02:52:13 +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
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +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
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
Johan Engelen
3ec79179b4 PGO: refactor such that there can be IR-based and frontend-based PGO. 2018-01-15 23:59:14 +01:00
Martin
cfad799f48 Merge 2.078.0 front-end and stdlibs 2018-01-06 01:39:18 +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
ae4db7d3b3 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-11-01 22:24:27 +03:00
Martin
95915a8ab8 Fix and refactor Objective-C state
Tie the state to an LLVM module/object file instead of having a global
one. And finalize it once per LLVM module instead of once per D module
(previously, as part of ModuleInfo generation).

Fixes issue #2388.
2017-10-26 20:28:53 +02:00
Ivan
31861621eb Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-10-23 21:53:27 +03:00
Martin
4381a909ca Use upstream's genCmain() 2017-10-23 16:49:40 +01:00
Ivan
dc78564bf4 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-10-14 12:28:32 +03:00
Martin
d7f68dbeb3 Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-10-01 18:28:44 +02:00
Ivan
808f36b2d2 Merge remote-tracking branch 'origin/master' into runtime_compile_v5 2017-10-01 17:02:50 +03:00
Johan Engelen
8ad5212399 Fix LLVM 6.0 build. (#2342)
* LLVM 6: tool_output_file was renamed to ToolOutputFile.

http://llvm.org/viewvc/llvm-project?view=revision&revision=314050

* Update SPIRV-LLVM

* Fix new LLVM6 API for sanitizerBlacklist->inSection
2017-09-30 17:58:08 +02:00