- Jan 02, 2011
-
-
Duncan Sands authored
in the PR, the pass could break LCSSA form when inserting preheaders. It probably would be easy enough to fix this, but since currently we always go into LCSSA form after running this pass, doing so is not urgent. llvm-svn: 122695
-
- Dec 31, 2010
-
-
Duncan Sands authored
operands are visited before the instructions themselves. llvm-svn: 122647
-
Duncan Sands authored
llvm-svn: 122645
-
- Dec 30, 2010
-
-
Benjamin Kramer authored
llvm-svn: 122642
-
- Dec 27, 2010
-
-
Benjamin Kramer authored
BuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and superseded by IRBuilder. llvm-svn: 122576
-
- Dec 25, 2010
-
-
Chris Lattner authored
llvm-svn: 122556
-
Chris Lattner authored
getOrEnforceKnownAlignment function, which simplifies the code and makes it stronger. llvm-svn: 122555
-
Chris Lattner authored
llvm-svn: 122554
-
- Dec 23, 2010
-
-
Jeffrey Yasskin authored
new gcc warning that complains on self-assignments and self-initializations. llvm-svn: 122458
-
- Dec 21, 2010
-
-
Duncan Sands authored
visit instructions before their uses, since InstructionSimplify does a better job in that case. All this prompted by Frits van Bommel. llvm-svn: 122343
-
Duncan Sands authored
not very important since the pass is only used for testing, but it does make it more realistic. Suggested by Frits van Bommel. llvm-svn: 122336
-
- Dec 20, 2010
-
-
Duncan Sands authored
llvm-svn: 122265
-
Duncan Sands authored
it could only be tested indirectly, via instcombine, gvn or some other pass that makes use of InstructionSimplify, which means that testcases had to be carefully contrived to dance around any other transformations that that pass did. llvm-svn: 122264
-
Chris Lattner authored
to make sure that the reused alloca has sufficient alignment. llvm-svn: 122236
-
Chris Lattner authored
llvm-svn: 122235
-
Chris Lattner authored
argument. The generated alloca has to have at least the alignment of the byval, if not, the client may be making assumptions that the new alloca won't satisfy. llvm-svn: 122234
-
- Dec 18, 2010
-
-
Chris Lattner authored
llvm-svn: 122156
-
- Dec 17, 2010
-
-
Benjamin Kramer authored
llvm-svn: 122054
-
Chris Lattner authored
comparisons formed by comparisons. For example, this: void foo(unsigned x) { if (x == 0 || x == 1 || x == 3 || x == 4 || x == 6) bar(); } compiles into: _foo: ## @foo ## BB#0: ## %entry cmpl $6, %edi ja LBB0_2 ## BB#1: ## %entry movl %edi, %eax movl $91, %ecx btq %rax, %rcx jb LBB0_3 instead of: _foo: ## @foo ## BB#0: ## %entry cmpl $2, %edi jb LBB0_4 ## BB#1: ## %switch.early.test cmpl $6, %edi ja LBB0_3 ## BB#2: ## %switch.early.test movl %edi, %eax movl $88, %ecx btq %rax, %rcx jb LBB0_4 This catches a bunch of cases in GCC, which look like this: %804 = load i32* @which_alternative, align 4, !tbaa !0 %805 = icmp ult i32 %804, 2 %806 = icmp eq i32 %804, 3 %or.cond121 = or i1 %805, %806 %807 = icmp eq i32 %804, 4 %or.cond124 = or i1 %or.cond121, %807 br i1 %or.cond124, label %.thread, label %808 turning this into a range comparison. llvm-svn: 122045
-
- Dec 15, 2010
-
-
Chris Lattner authored
llvm-svn: 121838
-
- 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
-