Commit graph

12 commits

Author SHA1 Message Date
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
David Nadlinger
43e27d0dd1 Remove USE_METADATA.
It has been on by default for quite some time now.
2013-06-07 02:48:53 +02:00
David Nadlinger
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
Benjamin Kramer
8b6f11938a Kill off StripMetaData. 2009-08-25 21:35:43 +02:00
Tomas Lindquist Olsen
d5d3ecdb05 Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake. 2009-07-31 11:28:31 +02:00
Benjamin Kramer
8576788245 Get rid of USE_METADATA 2009-07-11 14:19:21 +02:00
Benjamin Kramer
45f7401a5b Remove all of the now unecessary #if LLVM_REV 2009-07-11 14:09:33 +02:00
Frits van Bommel
96650855ed Add a pass to strip the bodies of available_externally functions so string
literals and `TypeInfo`s only referenced by them can be deleted by `-globaldce`.
2009-06-07 16:00:13 +02:00
Matti Niemenmaa
87d960c29a Fix build when USE_METADATA is off. 2009-05-02 19:03:33 +03:00
Frits van Bommel
262ef97945 There's an issue with LLVM metadata support; it triggers an assert when trying
to generate asm for code with metadata globals.
This new pass is used as a workaround: it strips metadata from the module before
it reaches the code generator.
Obviously, this is disabled if LLVM doesn't support metadata.
2009-05-02 12:19:43 +02:00
Frits van Bommel
cff0f1f446 Implement another D-specific pass: -dgc2stack
This one promotes GC allocations to stack memory when it can determine it's safe
to do so.
Not all GC calls are recognized yet (in fact only one *is* recognized for now).
Needs metadata, so disabled for LLVM versions that don't support it.
2009-05-02 11:58:50 +02:00
Frits van Bommel
0df1e34eb2 Implement first D-specific optimization pass: -simplify-drtcalls.
It uses the machinery of the standard -simplify-libcalls pass, but optimizes
calls to the D runtime instead of calls to C libraries.

At the moment, these optimizations are implemented by this pass:
 - Avoid the runtime call for `arr.length = newlen` if it can determine that
   the new length isn't longer than the old one.
 - Ditto for `cast(T[]) arr` if it will clearly always succeed.
   (e.g. if the length of the original array is zero, or if the old element
   size is a multiple of the new element size)
2009-04-28 21:58:06 +02:00