Kelly Wilson
b26b0f4196
Upgrade to LLVM-2.9. Thanks to David Nadlinger for the patch.
2011-04-19 21:57:15 -06:00
Alexey Prokhin
3a2aedc9ac
Fix building of the runtime as a shared library
2011-03-26 17:58:05 +03:00
Alexey Prokhin
8a49067776
Increment vgates in static constructors. That fixes static destructors of templates.
2011-01-02 17:43:02 +03:00
Alexey Prokhin
a86f414bc1
Fixed calling of _d_array_bounds and _d_switch_error.
2011-01-02 17:43:02 +03:00
Alexey Prokhin
8d7ff66019
Fixed the order of static destructors
2010-12-30 14:04:24 +03:00
Alexey Prokhin
14c6dfb895
Added pointers to shared constructors and destructors to ModuleInfo.
2010-11-05 17:40:29 +03:00
Alexey Prokhin
d0c7a5a3cb
Ported to new debug information format introduced in llvm 2.7
2010-10-30 20:57:32 +04:00
Alexey Prokhin
4d7a6eda23
Different fixes for d2
2010-10-07 22:35:32 +04:00
Tomas Lindquist Olsen
1fac40d2bd
Update to work with LLVM 2.7.
...
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).
Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.
Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
2010-05-19 12:42:32 +02:00
Benjamin Kramer
a54bf33d4b
This flush is not needed anymore.
2009-08-25 21:21:37 +02:00
Benjamin Kramer
d24643bb50
Avoid some unecessary heap allocations by using llvm's StringRef class.
2009-08-14 01:43:30 +02:00
Benjamin Kramer
c220dcac05
IntegerType is now contextifed.
...
Requires llvm >= 78969. resistor says this will be the last context API change :)
2009-08-14 00:39:18 +02:00
Benjamin Kramer
977fa551ee
Push the context through StructType::get.
...
Requires LLVM >= 78258. Also remove old #if's.
2009-08-06 01:47:39 +02:00
Benjamin Kramer
e05d3d8c3a
lookupTarget no longer takes a Module.
...
And we need to get TargetData from the module if the Target
doesn't have it.
2009-08-04 12:21:59 +02:00
Benjamin Kramer
4c5457ba61
getNullValue is in Constant again
...
Requires LLVM >= r77721
2009-07-31 23:01:29 +02:00
Benjamin Kramer
66101517d7
LLVMContext changes up to r77366
2009-07-30 15:25:10 +02:00
Benjamin Kramer
51c02d192a
Some minor cleanups
...
* remove an #ifdef USE_METADATA I accidently left in
* remove now unneeded llvm-version includes
* fix indentation in metadata.h
* prevent the "Found native target" message from interrupting ccmake
2009-07-20 18:16:11 +02:00
Benjamin Kramer
03020aea39
raw_fd_ostream takes a force parameter now
...
Build fix for LLVM 75801.
2009-07-15 20:04:42 +02:00
Benjamin Kramer
23b83c4d7b
Target.addPassesToEmitFile takes a formatted_raw_ostream now
...
Build fix for LLVM r75670
2009-07-14 23:06:31 +02:00
Benjamin Kramer
0ee2f34611
Don't use llvm::getGlobalContext() anymore
2009-07-13 20:16:15 +02:00
Benjamin Kramer
331319dab1
Build fix for the latest LLVMContext changes (LLVM r75445)
...
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
2009-07-13 12:17:58 +02:00
Benjamin Kramer
45f7401a5b
Remove all of the now unecessary #if LLVM_REV
2009-07-11 14:09:33 +02:00
Christian Kamm
756a2cb2a1
Adjust LDC to work with the LLVMContext LLVM changes.
...
This means we now require a fairly new LLVM revision. I use 75234.
2009-07-10 21:30:02 +02:00
Benjamin Kramer
22b36384b0
Fix build for LLVM >= r74640
...
Some LLVM objects now take a 'Context' to make multi-threaded apps easier.
Since we're not multi-threaded it's safe to use llvm::getGlobalContext()
which gives us the same behavior as we had before.
2009-07-03 17:24:35 +02:00
Frits van Bommel
4158fb474a
Add an llvm::OStream
workalike class for use with Logger::cout()
, with the
...
crucial difference being special handling of `llvm::Type`s so they get printed
by name rather than printing their full representation (which can be positively
*huge*).
This allows re-enabling some logger calls that were disabled due to extreme
verbosity.
2009-06-16 19:31:10 +02:00
Christian Kamm
b4f8bd6e52
Fix #318 by making a list of all seen template instances in a module for
...
singleobj compilation and then making sure they get emitted in their entirety.
2009-06-06 09:47:32 +02:00
Frits van Bommel
060d18b91e
Fix a bug in DtoNestedInit and update an unrelated comment.
2009-06-03 12:32:35 +02:00
Tomas Lindquist Olsen
092381577f
Some minor changes to handling of variables referenced from nested functions in D2 .
...
Added generation of new 'void*[4] reserved;' !ModuleInfo member .
2009-06-03 03:04:47 +02:00
Robert Clipsham
435d3069f6
Automated merge with http://hg.dsource.org/projects/ldc
2009-06-02 17:12:37 +01:00
Frits van Bommel
fd037f35e9
Fix a type mismatch in ModuleInfo generation.
2009-06-01 23:17:47 +02:00
Robert Clipsham
91ddf6140a
More tweaks.
2009-06-01 18:58:21 +01:00
Tomas Lindquist Olsen
b64ad3299e
Use RTTIBuilder to build !ModuleInfo, still needs some work.
2009-05-17 17:04:47 +02:00
Tomas Lindquist Olsen
9be5694168
Added error messages when failed to open files for .bc and .ll output, instead of just trying to write to the stream, pretty similar to the #281 problem.
2009-05-17 14:40:09 +02:00
Tomas Lindquist Olsen
0a77bd9fa6
Add error message when failed to open output stream for native asm output. Fixes ticket #281 .
2009-05-17 14:20:27 +02:00
Tomas Lindquist Olsen
c0f2af5afd
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
...
Added -v-cg switch, which right now just prints "codegen: module.name (module/name.d)" to stdout, this can really help figuring out where, in some complex build command, things go wrong.
2009-05-16 18:19:52 +02:00
Frits van Bommel
57fc3463f6
Run backend without optimizations when no optimization parameters were used,
...
even when not generating debug info.
2009-05-10 20:22:08 +02:00
Frits van Bommel
cf0b8936ce
Factor out the code to find gcc, and add a command-line option to override the
...
default executable name.
This should help cross-compilation by allowing a cross-gcc to be specified from
the configuration file instead of only through the CC environment variable.
2009-05-04 13:32:16 +02:00
Frits van Bommel
96108f8e7c
Now the backend wants an enum value as optimization level.
...
Hopefully this'll be the last change to that code...
2009-04-30 11:56:03 +02:00
Frits van Bommel
b9849d86b6
Update codegen to (hopefully) work correctly with newer LLVM trunk, where
...
there's no longer a Fast flag. (It has been replaced by an optimization level)
Untested because I haven't compiled that recent an LLVM yet :).
2009-04-29 10:26:28 +02:00
Tomas Lindquist Olsen
95b94935ee
Moved special casing of 'assert(this, "null this");' generated statements from !ThisExp into !AssertExp.
...
Fixed filenames for array bounds errors and probably others, fixes #271 .
2009-04-27 13:30:48 +02:00
Christian Kamm
17dbddfe41
Force 'fast' compilation when debug info is requested. LLVM trunk seems to
...
skip debug info for non-fast compilation.
2009-04-26 18:21:07 +02:00
Tomas Lindquist Olsen
134870c873
Disabled resetting types between modules MAO (more at once). Fixes guaranteed MOA compilation segfault.
2009-04-17 17:16:55 +02:00
Tomas Lindquist Olsen
c7936c2ace
!ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well.
2009-04-17 00:54:20 +02:00
Tomas Lindquist Olsen
37cf5a5789
Added Doxygen file.
...
Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
2009-04-15 20:06:25 +02:00
Tomas Lindquist Olsen
c6e9f7f9e2
Moved ir/irtype.* into ir/irdtype.*.
...
Renamed IrType to IrDType, analogous to IrDSymbol.
2009-03-31 20:21:28 +02:00
Frits van Bommel
e129494812
Allow specific optimization passes to be requested from the command line.
...
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")
One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
2009-03-29 15:46:55 +02:00
Christian Kamm
ca6a07e2e5
Emit function bodies before generating the module info to make sure static
...
ctors are collected correctly. Fixes run/constructor_03.
2009-03-28 20:45:33 +01:00
Christian Kamm
c5a09c9deb
Force initialize the runtime module in Module::genLLVMModule. It is required
...
for all non-trivial D modules anyway, so why load it lazily? This fixes
run/typeid_83.d (DtoDeclareTypeInfo expects runtime to be initialized)
2009-03-28 20:01:37 +01:00
Tomas Lindquist Olsen
ec986231e5
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
2009-03-27 21:50:32 +01:00
Tomas Lindquist Olsen
daef67acc3
Changed use of toObjFile to a new codegen method.
...
More versioning of DMD specific codegen code.
2009-03-27 17:54:27 +01:00