Commit graph

21 commits

Author SHA1 Message Date
Johan Engelen
91d306894e
Add support for LLVM 17. (#4533) 2023-12-03 19:07:31 +01:00
Martin Kinkelin
9ce57807c0 Drop support for LLVM 9 and LLVM 10 2023-07-29 01:12:43 +02:00
Martin Kinkelin
bdef01e7cc Raise min LLVM version to 9.0 2022-04-25 23:11:48 +02:00
Martin Kinkelin
019e9c8e30 Add support for LLVM 13 2021-10-11 19:20:15 +02:00
Nicholas Wilson
1568d0cdca
Fix compilation with LLVM 14 (#3822) 2021-09-17 16:41:49 +02:00
Martin Kinkelin
d8bc064cfb Add support for LLVM 12 2021-02-12 07:54:41 +01:00
Martin Kinkelin
cacdc46154 Use LLVM 10+ setFunctionAttributes()
Which supports more cmdline options in the meantime than what we have
been supporting manually, and should be future-proof, similar to
InitTargetOptionsFromCodeGenFlags().
Attributes are only set if explicitly specified in the cmdline (and not
already present in the function's existing attributes).

This started out as a workaround for not being able to determine whether
the user has explicitly set -frame-pointer in the cmdline with LLVM 11,
and ended with having to touch more than I wanted. An *enabled*
-ffast-math flag (from us, not LLVM) overriding LLVM's
-enable-unsafe-fp-math, but e.g. -ffast-math=false NOT overriding was/is
one of the quirks.
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
Johan Engelen
4e5989930f LLVM 10 fix: prevent linking in LLVM's TargetOptionsCommandFlags.o 2019-10-16 22:53:46 +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
9624834ccf Hide a few new LLVM 8 cmdline options 2019-03-02 19:54:36 +01:00
Martin Kinkelin
6015278dfa Restore -disable-fp-elim option for LLVM 8+ 2019-03-02 19:54:36 +01:00
Martin Kinkelin
306bda36fd Adapt to latest LLVM 8 changes 2019-03-02 19:54:36 +01:00
Johan Engelen
354e45737b
Support LLVM 9 (trunk) (#2983)
* LLVM 9: fix sanitizer pass renaming

* Add LLVM 9 to intrinsics in druntime

* LLVM 9: fix commandline option change from `-disable-fp-elim` to -frame-pointer=`

Resolves issue 2980
2019-01-25 17:58:26 +01:00
Martin Kinkelin
5c24f60cf9
Raise min LLVM version to 3.9 (#2872) 2018-10-15 22:31:59 +02:00
Johan Engelen
27321f1003 Fix building with LLVM trunk (#2668) 2018-04-27 17:59:53 +02:00
Martin
4f4ad49e58 LLVM 6: Adapt to LLVM CodeModel cmdline option now exposed as llvm::Optional 2018-04-15 03:38:16 +02:00
Martin Kinkelin
ca6472c3b0
Don't eliminate frame pointer by default at -O0 (#2483)
Fixes issue #2480.
2018-01-13 13:49:10 +01:00
Nicholas Wilson
baf3654868
Fix compilation with most recent LLVM (#2428)
Fix LDC compilation with latest LLVM (Mostly renaming and moving headers).
2017-12-03 18:25:43 +08:00
kinke
ae9d43c167 Use LLVM headers for shared codegen command-line options (#2148)
I.e., llvm/CodeGen/CommandFlags.h which in turn includes
llvm/MC/MCTargetOptionsCommandFlags.h.

This gets rid of a few duplicates on our side and includes about 35
(depending on LLVM version) new command-line options. LLVM provides a
helper function to set up the TargetOptions according to (most of) these
options.
Newer LLVM versions may add new options and we'll automatically inherit
them, including setting up the TargetOptions accordingly.

I did my best (TM) to remove a few unused/undesirable options and hide all
remaining new ones except for `-fp-contract`. The lists will need to be
tweaked from time to time.
2017-09-20 01:04:43 +02:00