- Apr 01, 2009
-
-
Misha Brukman authored
llvm-svn: 68167
-
Misha Brukman authored
* Simplified if statement llvm-svn: 68163
-
Douglas Gregor authored
llvm-svn: 68159
-
Chris Lattner authored
llvm-svn: 68158
-
Chris Lattner authored
it be an LLVM IR User object. llvm-svn: 68156
-
Chris Lattner authored
if it dangles. llvm-svn: 68150
-
Chris Lattner authored
which are effectively smart pointers to Value*'s. They are both very light weight and simple, and react to values being destroyed or being RAUW'd. WeakVN does a best effort to follow a value around, including through RAUW operations and will get nulled out of the value is destroyed. This is useful for the eventual "metadata that references a value" work, because it is a reference to a value that does not show up on its use_* list. AssertingVH is a pointer that compiles down to a dumb raw pointer when assertions are disabled. When enabled, it emits an assertion if the pointed-to value is destroyed while it is still being referenced. This is very useful for Maps and other things, and should have caught the recent bugs in CallGraph and Reassociate, for example. llvm-svn: 68149
-
- Mar 31, 2009
-
-
Chris Lattner authored
llvm-svn: 68147
-
Chris Lattner authored
llvm-svn: 68145
-
Evan Cheng authored
Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1. e.g. define i32 @t1(i32 %c, i32 %x) nounwind { %t1 = icmp eq i32 %c, 0 %t2 = lshr i32 %x, 18 %t3 = select i1 %t1, i32 %t2, i32 %x ret i32 %t3 } was turned into define i32 @t2(i32 %c, i32 %x) nounwind { %t1 = icmp eq i32 %c, 0 %t2 = select i1 %t1, i32 18, i32 0 %t3 = lshr i32 %x, %t2 ret i32 %t3 } For most targets, that means materializing two constants and then a select. e.g. On x86-64 movl %esi, %eax shrl $18, %eax testl %edi, %edi cmovne %esi, %eax ret => xorl %eax, %eax testl %edi, %edi movl $18, %ecx cmovne %eax, %ecx movl %esi, %eax shrl %cl, %eax ret Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits. llvm-svn: 68142
-
Evan Cheng authored
llvm-svn: 68134
-
Evan Cheng authored
llvm-svn: 68133
-
Dan Gohman authored
entered via fall-through. Don't miss fallthroughs from blocks terminated by conditional branches. Also, move isOnlyReachableByFallthrough out of line. llvm-svn: 68129
-
Mikhail Glushenkov authored
Does not work well on 32 bit targets. Bug reported by Albert Graef. This patch also adds new "-Wllc,option" syntax to pass options to llc. llvm-svn: 68127
-
Douglas Gregor authored
llvm-svn: 68126
-
Dan Gohman authored
possible to run the tests with -asm-verbose defaulting to false. llvm-svn: 68124
-
Devang Patel authored
Patch by Jay Foad. llvm-svn: 68120
-
Daniel Dunbar authored
llvm::sys::getOS{Name,Version}. Right now the implementation just derives from LLVM_HOSTTRIPLE (which is wrong, but it doesn't look like we have a define for the target triple). Ideally this routine would actually be able to compute the triple for targets we care about. llvm-svn: 68118
-
Dan Gohman authored
llvm-svn: 68113
-
Dan Gohman authored
llvm-svn: 68112
-
Dan Gohman authored
llvm-svn: 68111
-
Rafael Espindola authored
llvm-svn: 68109
-
Bill Wendling authored
llvm-svn: 68100
-
Bill Wendling authored
llvm-svn: 68099
-
Owen Anderson authored
Remove the "fast" cases for spill and restore point determination, as these were subtlely wrong in obscure cases. Patch the testcase to account for this change. llvm-svn: 68093
-
Bill Wendling authored
llvm-svn: 68092
-
Chris Lattner authored
llvm-svn: 68087
-
Dan Gohman authored
instructions. This fixes lua. llvm-svn: 68083
-
Evan Cheng authored
X86 address mode isel tweak. If the base of the address is also used by a CopyToReg (i.e. it's likely live-out), do not fold the sub-expressions into the addressing mode to avoid computing the address twice. The CopyToReg use will be isel'ed to a LEA, re-use it for address instead. This is not yet enabled. llvm-svn: 68082
-
Douglas Gregor authored
llvm-svn: 68079
-
Dan Gohman authored
only reachable via fall-through edges. This dramatically reduces the number of labels printed, and thus also the number of labels the assembler must parse and remember. llvm-svn: 68073
-
Devang Patel authored
Loop Index Split can eliminate a loop if it can determin if loop body is executed only once. There was a bug in determining IV based value of the iteration for which the loop body is executed. Fix it. llvm-svn: 68071
-
- Mar 30, 2009
-
-
Douglas Gregor authored
llvm-svn: 68067
-
Evan Cheng authored
When optimzing a mul by immediate into two, the resulting mul's should get a x86 specific node to avoid dag combiner from hacking on them further. llvm-svn: 68066
-
Evan Cheng authored
Turn a 2-address instruction into a 3-address one when it's profitable even if the two-address operand is killed. e.g. %reg1024<def> = MOV r1 %reg1025<def> = ADD %reg1024, %reg1026 r0 = MOV %reg1025 If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy. llvm-svn: 68065
-
Chris Lattner authored
llvm-svn: 68060
-
Bill Wendling authored
llvm-svn: 68059
-
Bill Wendling authored
llvm-svn: 68057
-
Chris Lattner authored
anything pointer-like, which may or may not actually be a pointer. llvm-svn: 68056
-
Chris Lattner authored
allow the traits to be specified as well. llvm-svn: 68055
-