Commit Graph

12 Commits

Author SHA1 Message Date
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
66101517d7 LLVMContext changes up to r77366 2009-07-30 15:25:10 +02:00
Benjamin Kramer
3f0a0686a8 Value::getNameStart and Value::getNameLength were removed 2009-07-23 20:34:35 +02:00
Benjamin Kramer
27a9f93767 DOUT is deprecated, use DEBUG(errs()) instead 2009-07-27 11:44:01 +02:00
Benjamin Kramer
d7049de966 More factory methods moved to LLVMContext 2009-07-15 18:09:41 +02:00
Benjamin Kramer
0ee2f34611 Don't use llvm::getGlobalContext() anymore 2009-07-13 20:16:15 +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
Frits van Bommel
5ecdf1a70a Eliminate comparisons between GC allocations and constants. This removes some
`assert(this !is null)`s when member functions get inlined.

Also tweak pass order a bit.
2009-06-20 14:28:59 +02:00
Frits van Bommel
d1f582583b Turn new _d_array_slice_copy runtime call into memcpy when the slice lengths are
equal and alias analysis says it's safe.
2009-05-10 04:18:14 +02:00
Frits van Bommel
634d623b34 Some tweaks to -simplify-drtcalls. 2009-05-09 02:34:27 +02:00
Frits van Bommel
34955bcbf9 Remove calls to some runtime functions if their results are unused 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