Kai Nacke
269e64e52e
Add LLVM 3.7 changes to latest code merges.
2015-07-14 22:45:35 +02:00
David Nadlinger
4e2bc18957
Fix debug info builds with inlining on
...
This is likely an LLVM bug: The code in InlineFunctions.cpp
only updates the source location metadata for the instructions
in the inlined callee when the call site has a source location
set. When the caller has no location metadata, the scope for
the inlined instructions thus still points to the DISubprogram
for the original callee. This then leads to an assertion during
codegen.
GitHub: Fixes #998 .
2015-07-13 02:22:38 +02:00
Kai Nacke
d1e764cec1
Backport of "Avoid using llvm::Linker" to master.
...
See pull request #974 for the original code.
2015-06-27 22:08:44 +02:00
Kai Nacke
d7347a5829
Do not imply -singleObj
if creating lib.
...
If a target file name is given (`-of`) and a library is created then
`-singleObj` is implied. This results in behaviour not compatible
with dmd. This commit checks for this situation and does not set
`-singleObj`. This fixes issue #978 .
2015-06-26 07:41:16 +02:00
Kai Nacke
8d0fada2c2
LLVM 3.7: The signature of CreateCall() has changed.
...
The method now takes an array with the argument values.
2015-05-22 21:25:14 +02:00
kai
2f3b31909b
LLVM 3.7: Fix GEP instructions in coverage code.
2015-04-28 00:13:43 +02:00
kai
fc59f0392f
Fix a printf warning.
2015-04-26 21:10:54 +02:00
Kai Nacke
92c4361f2e
LLVM 3.7: Mote GEP-related changes
2015-04-09 22:53:20 +02:00
Johan Engelen
505f18ca2a
Add coverage analysis ("-cov=...") to ldc2
2015-04-07 22:11:02 +02:00
kai
908815256f
LLVM 3.7: Explicit string conversion required for DataLayout.
2015-03-06 22:08:08 +01:00
kai
e73a7f2e23
Several updates to debug info generation.
...
- Do not create debug info after we called finalize.
- Clean up debug info generation for module ctor/dtor.
- Rename EmitSubProgramInternal() to EmitModuleCTor().
- Remove unused parameter from CreateTypeDescription().
2015-02-22 21:10:28 +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
David Nadlinger
e4aa92deb3
Get rid of more superfluous casts with DMD arrays.
...
There are still a few more left.
2014-11-16 08:00:17 +01:00
kai
37349a7fb4
First set of changes to compile LDC on AIX 7.1.
2014-11-16 05:55:50 +01:00
Kai Nacke
fce5f432b9
Allow overriding of header files.
...
This is the same behavior as DMD.
2014-10-25 18:05:28 +02:00
Alexey Prokhin
66a392a5c2
Rename Type::irtype to ctype for consistency with dmd and gdc
2014-10-05 16:55:12 +04:00
Kai Nacke
382ad184d8
Merge branch 'master' into merge-2.066
...
Conflicts:
dmd2/builtin.c
gen/classes.cpp
gen/functions.cpp
gen/llvmhelpers.cpp
gen/statements.cpp
gen/toir.cpp
runtime/druntime
runtime/phobos
2014-09-13 23:11:54 +02:00
Alexey Prokhin
18f33b1815
Make IrDsymbol to be a typesafe union to reduce memory usage
2014-09-12 14:43:49 +04:00
Alexey Prokhin
76dec46df5
WIP: merge dmdfe 2.066
2014-08-22 16:01:28 +04:00
kai
f4e2d8486b
Fix a typo in variable name
2014-07-14 06:47:42 +02:00
kai
bdd346c3ae
Change type of ldc.dso_initialized to i8.
...
Also being only a flag, it is safer to use the i8 type and compare against 0.
This adds only an icmp instruction to the IR and should not change the generated machine code.
2014-07-14 06:47:39 +02:00
David Nadlinger
314c052f27
Fix broken merge.
2014-07-11 18:28:50 +02:00
David Nadlinger
3503206ccc
Do not try to verify/emit LLVM module on codegen error.
2014-07-11 18:11:16 +02:00
David Nadlinger
04570399d4
Implement previously inoperative pragma(LDC_no_moduleinfo).
...
GitHub: Fixes #571 .
2014-07-10 01:20:31 +02:00
kai
45fca1f3b5
Add line number to error message of -nogc switch.
...
This was suggested by bearophile in the news group.
It also changes all Loc objects to be passed by reference.
2014-07-04 07:15:05 +02:00
David Nadlinger
d8a7ae1841
Use --gc-sections on Linux.
...
This was painful.
2014-06-30 16:18:15 +02:00
David Nadlinger
2e80741d5e
Remove unused 'seenTemplateInstances' mechanism.
2014-06-30 15:28:16 +02:00
David Nadlinger
b0ff0de9c1
Make function entry basic blocks unnamed.
...
The performance impact should be completely immeasurable,
but the main benefit is that this makes IR dumps slightly
nicer to look at (as the redundant "empty:" labels are
now omitted entirely).
2014-06-29 16:47:44 +02:00
kai
2b6dbb03f4
Add IF_LOG to more logging statements.
...
Evaluating arguments which call toChars() or toPrettyChars() are much more expensive then checking Logger::enabled().
2014-06-26 06:54:38 +02:00
Kai Nacke
fb18a7ab82
Merge branch 'merge-2.064' into merge-2.065
2014-05-13 06:56:23 +02:00
Kai Nacke
ec63589a36
Remove some casts.
2014-05-10 22:55:23 +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
a56be4af43
Fix compile errors on OpenIndiana (OpenSolaris)
2014-04-08 17:50:00 +02:00
kai
456924116b
Merge branch 'merge-2.064' into merge-2.065
2014-04-05 22:37:27 +02:00
Kai Nacke
ecbd01a2fa
Merge branch 'master' into merge-2.064
2014-04-05 22:23:36 +02:00
Kai Nacke
3a77228b69
Fix unresolved reference with shared libldc.so
2014-04-05 22:22:05 +02: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 Nacke
d6b4000f8c
Merge remote-tracking branch 'origin/master' into merge-2.064
2014-01-26 00:01:38 +01:00
Kai Nacke
704ab30001
Emit ldc version as llvm.ident metadata.
2014-01-26 00:00:21 +01:00
Kai Nacke
c193a3b4c8
Merge branch 'master' into merge-2.064
2014-01-13 18:17:51 +01:00
Kai Nacke
87afa717ae
Fix more files for LLVM 3.5.
2014-01-13 18:16:22 +01:00
Kai Nacke
61720bf1ba
Fix ouput for test diag8354
2014-01-03 18:02:29 +01:00
Kai Nacke
e7fdbafe2d
Fix generation of position-independent code.
...
The new module discovery scheme requires the following section order:
.minfo_beg
.minfo
.minfo_end
This works for non-PIC code because the segments have the same attributes.
However, if -relocation-model=pic is passed to ldc2 then the .minfo section
becomes writeable and the sequence of sections is changed.
The quick fix is to mark the data always as writeable. Then all sections are
always writeable.
I think a better solution would be to base this in the used relocation model.
But this information is currently only available in the driver.
This fixes the failure in test case runnable/eh2.d
2013-12-18 16:54:49 +01:00
Kai Nacke
87965cdc19
Merge branch 'master' into merge-2.064
...
Conflicts:
runtime/druntime
2013-11-26 08:00:10 +01:00
Kai Nacke
7f017608a8
Use enum literal instead of constant
2013-11-26 07:56:50 +01:00
David Nadlinger
d9b137bb45
Implement new ModuleInfo discovery/druntime startup scheme on Linux.
...
This is the same implementation that is used for DMD and
supports shared libraries (not yet tested).
2013-10-29 19:21:15 +01:00
David Nadlinger
cb341586e3
First merge of 2.064 beta.
...
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.
Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
Kai Nacke
90d0f6c12a
Merge pull request #429 from redstar/moduleflags
...
Implement pragma(lib) on Windows using module metadata.
2013-10-14 00:26:17 -07:00
kai
4f7bc678fb
Implement pragma(lib) using module metadata.
...
Since LLVM 3.3 pragma(lib) can be implemented like DMD does.
2013-10-13 20:35:34 +02:00
David Nadlinger
1242be25d0
Remove unused, empty Ir type.
...
The codegen parameter was changed to IRState instead of
removing it to set the stage for an eventual eradication
of the gIR global.
2013-10-13 19:44:29 +02:00