- Dec 16, 2010
-
-
Dan Gohman authored
llvm-svn: 121944
-
Dan Gohman authored
llvm-svn: 121921
-
- Dec 15, 2010
-
-
Owen Anderson authored
(performing the addition in a wider type and explicitly checking for overflow), and fold them down to intrinsics. This currently only supports signed-addition, but could be generalized if someone works out the magic constant formulas for other operations. Fixes <rdar://problem/8558713>. llvm-svn: 121905
-
Dan Gohman authored
function so that it can live in Analysis instead of VMCore. llvm-svn: 121885
-
Duncan Sands authored
instcombine and into InstructionSimplify. llvm-svn: 121861
-
Frits van Bommel authored
Teach jump threading to "look through" a select when the branch direction of a terminator depends on it. When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately. llvm-svn: 121859
-
Chris Lattner authored
llvm-svn: 121838
-
Owen Anderson authored
this case involve a select that simplifies to itself. llvm-svn: 121817
-
Owen Anderson authored
llvm-svn: 121816
-
- Dec 14, 2010
-
-
Chris Lattner authored
which is simpler than finding a place to insert in BB. - Don't perform the 'if condition hoisting' xform on certain i1 PHIs, as it interferes with switch formation. This re-fixes "example 7", without breaking the world hopefully. llvm-svn: 121764
-
Chris Lattner authored
first, it can kick in on blocks whose conditions have been folded to a constant, even though one of the edges will be trivially folded. second, it doesn't clean up the "if diamond" that it just eliminated away. This is a problem because other simplifycfg xforms kick in depending on the order of block visitation, causing pointless work. llvm-svn: 121762
-
Chris Lattner authored
breaking the selfhost builds, though I can't fathom how. llvm-svn: 121761
-
Chris Lattner authored
when all 2-entry phis are simplified away. llvm-svn: 121760
-
Chris Lattner authored
don't print it unless the xform happens. llvm-svn: 121758
-
Chris Lattner authored
llvm-svn: 121757
-
Chris Lattner authored
llvm-svn: 121756
-
Chris Lattner authored
llvm-svn: 121755
-
Chris Lattner authored
GetIfCondition faster by avoiding pred_iterator. No really interesting change. llvm-svn: 121754
-
Chris Lattner authored
llvm-svn: 121753
-
Chris Lattner authored
code a bit, switch from constant folding to instsimplify. llvm-svn: 121751
-
Chris Lattner authored
work, but fixes 400.perlbmk. llvm-svn: 121749
-
Owen Anderson authored
Fix recent buildbot breakage by pulling SimplifyCFG back to its state as of r121694, the most recent state where I'm confident there were no crashes or miscompilations. XFAIL the test added since then for now. llvm-svn: 121733
-
Chris Lattner authored
temporarily disable part of my previous patch, which causes an iterator invalidation issue, causing a crash on some versions of perlbmk. llvm-svn: 121728
-
- Dec 13, 2010
-
-
Chris Lattner authored
llvm-svn: 121711
-
Benjamin Kramer authored
llvm-svn: 121705
-
Chris Lattner authored
'and' case. llvm-svn: 121695
-
Chris Lattner authored
I can track down a miscompile. This should bring the buildbots back to life llvm-svn: 121693
-
Chris Lattner authored
when simplifying, allowing them to be eagerly turned into switches. This is the last step required to get "Example 7" from this blog post: http://blog.regehr.org/archives/320 On X86, we now generate this machine code, which (to my eye) seems better than the ICC generated code: _crud: ## @crud ## BB#0: ## %entry cmpb $33, %dil jb LBB0_4 ## BB#1: ## %switch.early.test addb $-34, %dil cmpb $58, %dil ja LBB0_3 ## BB#2: ## %switch.early.test movzbl %dil, %eax movabsq $288230376537592865, %rcx ## imm = 0x400000017001421 btq %rax, %rcx jb LBB0_4 LBB0_3: ## %lor.rhs xorl %eax, %eax ret LBB0_4: ## %lor.end movl $1, %eax ret llvm-svn: 121690
-
Chris Lattner authored
llvm-svn: 121689
-
Chris Lattner authored
per terminator kind. llvm-svn: 121688
-
Chris Lattner authored
llvm-svn: 121687
-
Chris Lattner authored
doing a cfg search for every block simplified. llvm-svn: 121686
-
Chris Lattner authored
llvm-svn: 121685
-
Chris Lattner authored
llvm-svn: 121684
-
Chris Lattner authored
getSinglePredecessor to simplify code. llvm-svn: 121683
-
Chris Lattner authored
llvm-svn: 121681
-
Chris Lattner authored
'or sequence' that it doesn't understand. This allows us to optimize something insane like this: int crud (unsigned char c, unsigned x) { if(((((((((( (int) c <= 32 || (int) c == 46) || (int) c == 44) || (int) c == 58) || (int) c == 59) || (int) c == 60) || (int) c == 62) || (int) c == 34) || (int) c == 92) || (int) c == 39) != 0) foo(); } into: define i32 @crud(i8 zeroext %c, i32 %x) nounwind ssp noredzone { entry: %cmp = icmp ult i8 %c, 33 br i1 %cmp, label %if.then, label %switch.early.test switch.early.test: ; preds = %entry switch i8 %c, label %if.end [ i8 39, label %if.then i8 44, label %if.then i8 58, label %if.then i8 59, label %if.then i8 60, label %if.then i8 62, label %if.then i8 46, label %if.then i8 92, label %if.then i8 34, label %if.then ] by pulling the < comparison out ahead of the newly formed switch. llvm-svn: 121680
-
Chris Lattner authored
llvm-svn: 121678
-
Chris Lattner authored
llvm-svn: 121676
-
Chris Lattner authored
llvm-svn: 121675
-