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
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 Nacke
2cdbe58d86
Default enable attribute cx16 (-mattr=+cx16
).
...
This enables code generation for cmpxchg16b instruction which is
not available on very old 64bit CPUs.
The user can change this be choosing a different cpu (`-mcpu=...`)
or by explicitly disabling the attribute (`-mattr=-cx16`).
2015-09-10 21:03:21 +02:00
Martin
2cf1a07f35
Fix LLVM 3.7 build
2015-08-08 17:08:41 +02:00
Kai Nacke
bbe3c279f1
LLVM 3.8: Access to data layout from llvm::TargetMachine has changed.
...
This changes only a small fraction of the code.
2015-08-07 11:54:38 +02:00
Kai Nacke
f67186592a
LLVM 3.7: NoFramePointerElim is now an attribute.
...
Temporary workaround to enable Travis-CI.
2015-06-04 15:07:02 +02:00
Kai Nacke
2d9e66de66
Fix assertion in getABI().
2015-05-25 16:20:48 +02:00
Kai Nacke
2331889669
MIPS: Implement ABI handling.
...
Adds a new command line option -mabi= and uses the value to compute
the ABI to use. Adds the ABI to linker and assembler invocation, too.
Allows consistent invocation of the whole tool chain.
2015-05-24 18:11:24 +02:00
Kai Nacke
afe6051ead
LLVM 3.7: Fix MIPS ABI definition.
...
Detection of EABI is still missing.
2015-05-16 18:56:59 +02:00
Kai Nacke
82a76cf3f8
LLVM 3.7: TargetOptions.UseSoftFloat is gone.
...
A function attribute use-soft-float with values true or false is used instead.
This commi only ensures that LDC compiles with LLVM 3.7. The possible semantic
change needs to be evaluated.
2015-05-12 18:11:30 +02:00
Kai Nacke
cc9a810a69
LLVM: TargetRegistry: iterator was replaced by iterator_range.
2015-05-12 17:51:48 +02:00
Dan Olson
f554c322a8
Lookup default float-abi for thumb same as arm
...
Was always defaulting thumb to soft, now uses same rules for arm. The
end result is that thumbv7-apple-ios now defaults to softfp correctly.
(cherry picked from commit e0cf8e85c2e42f382742c326f8963b8bf779df8c)
2015-02-28 23:57:38 -08:00
Dan Olson
3c9da62ea3
Set version ARM_SoftFP
...
Set versions ARM_SoftFP & D_HardFloat instead of ARM_SoftFloat &
D_SoftFloat for option -mfloat-abi=softfp (function calls use soft float
ABI but using hardware floating point instruction).
(cherry picked from commit 5a19080e04cc775fe94ea2ef74c850b26bb8a469)
2015-02-28 23:53:30 -08:00
Andreas Hollandt
8af29baeda
fix #667 flags list used as string
...
enable function and data sections
fix incorrect library search paths
2014-07-17 00:11:08 +02:00
Andreas Hollandt
956f1ff528
adapt to API change
2014-07-01 18:34:36 +02:00
David Nadlinger
d8a7ae1841
Use --gc-sections on Linux.
...
This was painful.
2014-06-30 16:18:15 +02:00
Kai Nacke
92c06dede0
Merge branch 'merge-2.064' into merge-2.065
...
Conflicts:
runtime/druntime
2014-05-10 21:38:37 +02:00
kai
841f874e04
Fix LLVM 3.5 API change
2014-05-07 07:18:37 +02:00
kai
456924116b
Merge branch 'merge-2.064' into merge-2.065
2014-04-05 22:37:27 +02:00
Kai Nacke
46090e6316
Fix use of default MIPS ABI.
2014-04-04 07:33:35 +02:00
Kai Nacke
a1e73fa609
Merge branch 'merge-2.064' into merge-2.065
2014-03-30 22:59:15 +02:00
Kai Nacke
38c98c3584
Add version identifiers of MIPS ABI.
...
Parses the feature string and appends the required ABI feature.
Uses the feature string to define the version identifier.
2014-03-30 22:39:05 +02:00
Kai Nacke
34322f78dc
Merge branch 'merge-2.064' into merge-2.065
2014-03-24 07:27:59 +01:00
Kai Nacke
61f4603afe
Merge branch 'master' into merge-2.064
2014-03-24 07:27:25 +01:00
Kai Nacke
794d5d2d71
Add Krait cpu for detection of ARM architecture version.
2014-03-23 20:05:22 +01:00
Kai Nacke
fe39da53e3
Merge of 2.065.0-b3.
...
The new visitor class is used for IR generation. This removes some modifications from DMD source.
2014-02-10 08:47:25 +01:00
kai
5ded3ff54c
Do not enable EABI on Darwin.
...
This should fix a crash using triple armv7-apple-darwin with LLVM 3.4.
2014-02-01 22:40:27 +01:00
Kai Nacke
4c2d23922e
Fix the ARM build with LLVM 3.5.
...
EHABI is now enabled be default and the options to enable it are gone.
2014-02-01 15:17:38 +01:00
David Nadlinger
257da5afe5
Bring back -disable-fp-elim.
...
It was moved to llvm/CodeGen/CommandLineFlags.h.
GitHub: Fixes #502 .
2013-10-13 20:26:19 +02:00
David Nadlinger
e4fee1116a
ARM: Use -arm-enable-ehabi(-descriptors).
...
D exception handling does not work at all yet, but with these
flags it does for C++/Clang, at least in simple cases.
2013-10-06 20:15:28 +02:00
David Nadlinger
aba1b82539
Finally fix LLVM 3.1 compilation.
2013-10-06 19:26:58 +02:00
David Nadlinger
445b743ba5
Implement lookupTarget() with arch override for LLVM 3.1.
...
To be removed again once we drop 3.1 support.
2013-10-06 19:12:36 +02:00
David Nadlinger
422715fc89
Add -float-abi switch and auto-detection for ARM.
...
This is based on the implementation that was reverted in
fc8e0c4c20
.
2013-10-06 07:39:12 +02:00
David Nadlinger
49697a8bc2
if chain -> switch.
2013-10-06 07:39:12 +02:00
David Nadlinger
1335e26c45
Log/error message prettification.
2013-10-06 07:37:03 +02:00
David Nadlinger
359f6c585a
CPU detection for ARM.
...
This is not perfect yet, as lookupTarget wipes out any more
specific arch info (e.g. armv8) the triple might have.
2013-10-06 07:36:59 +02:00
David Nadlinger
e9e4e10085
Auto-detect target attributes for -mcpu=native.
...
This is currently only implemented for ARM in LLVM.
2013-10-06 02:38:50 +02:00
David Nadlinger
e57d0458fb
getX86TargetCPU cleanup.
2013-10-06 01:48:21 +02:00
David Nadlinger
d17aa2aaac
Disentangle -march and -mcpu.
...
-mcpu=native now actually works.
GitHub: Fixes #414 .
2013-10-06 01:48:12 +02:00
David Nadlinger
02abf028f8
Don't require -triple when using -march.
...
There is really no reason we should, and I couldn't find out
why that check was added back in 2009.
Also cleaned up the code a bit now that the LLVM 3.0 branches
are gone.
2013-10-06 01:35:20 +02:00
David Nadlinger
68c272d6d9
Renamed driver/target to .../targetmachine to avoid confusion with the frontend file.
2013-10-06 01:33:28 +02:00