- Dec 29, 2007
-
-
Chris Lattner authored
llvm-svn: 45418
-
Chris Lattner authored
llvm-svn: 45415
-
Christopher Lamb authored
Disable null pointer folding transforms for non-generic address spaces. This should probably be a target-specific predicate based on address space. That way for targets where this isn't applicable the predicate can be optimized away. llvm-svn: 45403
-
Chris Lattner authored
have potential side-effects. llvm-svn: 45392
-
- Dec 28, 2007
-
-
Owen Anderson authored
Repair a transform that Chris noticed a bug in. Thanks to Nicholas for pointing out my stupid mistakes when writing this patch. :-) llvm-svn: 45384
-
Chris Lattner authored
define i32 @main() { entry: %z = alloca i32 ; <i32*> [#uses=2] store i32 0, i32* %z %tmp = load i32* %z ; <i32> [#uses=1] %sub = sub i32 %tmp, 1 ; <i32> [#uses=1] %cmp = icmp ult i32 %sub, 0 ; <i1> [#uses=1] %retval = select i1 %cmp, i32 1, i32 0 ; <i32> [#uses=1] ret i32 %retval } into ret 1, instead of ret 0. Christopher, please investigate. llvm-svn: 45383
-
- Dec 25, 2007
-
-
Gordon Henriksen authored
when copying functions. llvm-svn: 45356
-
Chris Lattner authored
it is only a partial fix. This change is noise for most programs, but speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%, hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc. OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info). llvm-svn: 45354
-
Gordon Henriksen authored
define void @f() { ... call i32 @g() ... } define void @g() { ... } The hazards are: - @f and @g have GC, but they differ GC. Inlining is invalid. This may never occur. - @f has no GC, but @g does. g's GC must be propagated to @f. The other scenarios are safe: - @f and @g have the same GC. - @f and @g have no GC. - @g has no GC. This patch adds inliner checks for the former two scenarios. llvm-svn: 45351
-
- Dec 24, 2007
-
-
Chris Lattner authored
When specified, don't split backedges of single-bb loops. This helps address PR1877 llvm-svn: 45344
-
- Dec 22, 2007
-
-
Chris Lattner authored
us to compile: #include <math.h> int t1(double d) { return signbit(d); } into: _t1: movd %xmm0, %rax shrq $63, %rax ret instead of: _t1: movd %xmm0, %rax shrq $32, %rax shrl $31, %eax ret on x86-64. llvm-svn: 45311
-
Devang Patel authored
not merge current bb and succ even if bb's terminator is unconditional branch to succ. llvm-svn: 45305
-
- Dec 21, 2007
-
-
Duncan Sands authored
return attributes on the floor. In the case of a call to a varargs function where the varargs arguments are being removed, any call attributes on those arguments need to be dropped. I didn't do this because I plan to make it illegal to have such attributes (see next patch). With this change, compiling the gcc filter2 eh test at -O0 and then running opt -std-compile-opts on it results in a correctly working program (compiling at -O1 or higher results in the test failing due to a problem with how we output eh info into the IR). llvm-svn: 45285
-
- Dec 20, 2007
-
-
Christopher Lamb authored
(icmp slt (sub A B) 1) -> (icmp sle A B) icmp sgt (sub A B) -1) -> (icmp sge A B) and add testcase. llvm-svn: 45256
-
Evan Cheng authored
Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv. llvm-svn: 45251
-
Chris Lattner authored
has a single use, and generalize it to not require N to be a constant. llvm-svn: 45250
-
Evan Cheng authored
llvm-svn: 45230
-
- Dec 19, 2007
-
-
Duncan Sands authored
calls 'nounwind'. It is important for correct C++ exception handling that nounwind markings do not get lost, so this transformation is actually needed for correctness. llvm-svn: 45218
-
- Dec 18, 2007
-
-
Christopher Lamb authored
from _foo: movl $99, %ecx movl 4(%esp), %eax subl %eax, %ecx xorl %edx, %edx testl %ecx, %ecx cmovs %edx, %eax ret to _foo: xorl %ecx, %ecx movl 4(%esp), %eax cmpl $99, %eax cmovg %ecx, %eax ret llvm-svn: 45173
-
Christopher Lamb authored
llvm-svn: 45170
-
Christopher Lamb authored
llvm-svn: 45169
-
Duncan Sands authored
doesNotThrow. llvm-svn: 45160
-
Christopher Lamb authored
llvm-svn: 45159
-
Christopher Lamb authored
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV. This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll llvm-svn: 45158
-
- Dec 17, 2007
-
-
Duncan Sands authored
how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). llvm-svn: 45108
-
David Greene authored
GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase. llvm-svn: 45101
-
David Greene authored
Get rid of annoying spaces. llvm-svn: 45100
-
David Greene authored
passed the erased element. llvm-svn: 45099
-
Christopher Lamb authored
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
-
- Dec 16, 2007
-
-
Duncan Sands authored
changed not to reject invoke of inline asm. llvm-svn: 45077
-
Duncan Sands authored
calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... llvm-svn: 45073
-
- Dec 13, 2007
-
-
Evan Cheng authored
llvm-svn: 44997
-
Evan Cheng authored
llvm-svn: 44981
-
Chris Lattner authored
llvm-svn: 44965
-
- Dec 12, 2007
-
-
Wojciech Matyjewicz authored
2. Using zero-extended value of Scale and unsigned division is safe provided that Scale doesn't have the sign bit set. Previously these 2 instructions: %p = bitcast [100 x {i8,i8,i8}]* %x to i8* %q = getelementptr i8* %p, i32 -4 were combined into: %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0, i32 1431655764, i32 0 what was incorrect. llvm-svn: 44936
-
Evan Cheng authored
llvm-svn: 44905
-
Evan Cheng authored
Bug fix. Only safe to perform extension uses optimization if the source of extension is also defined in the same BB as the extension. llvm-svn: 44896
-
- Dec 10, 2007
-
-
Chris Lattner authored
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use targetdata to validate that it is safe. While I'm in there, fix some const correctness issues and generalize the interface to the "operand folder". llvm-svn: 44817
-
Duncan Sands authored
on functions as it calculates them. llvm-svn: 44802
-
Gordon Henriksen authored
methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. llvm-svn: 44769
-