- May 18, 2011
-
-
Devang Patel authored
llvm-svn: 131551
-
Devang Patel authored
llvm-svn: 131548
-
Devang Patel authored
llvm-svn: 131545
-
Devang Patel authored
llvm-svn: 131508
-
- May 14, 2011
-
-
Benjamin Kramer authored
llvm-svn: 131345
-
- Apr 29, 2011
-
-
Peter Collingbourne authored
llvm-svn: 130528
-
Peter Collingbourne authored
llvm-svn: 130527
-
Peter Collingbourne authored
llvm-svn: 130526
-
- Apr 14, 2011
-
-
Chris Lattner authored
instruction around, reducing work. Greatly simplify handling of debug instructions. There is no need to build up a vector of them and then move them into the one predecessor if we're processing a block. Instead just rescan the block and *copy* them into the pred. If a block gets merged into multiple preds, this will retain more debug info. llvm-svn: 129502
-
- Apr 12, 2011
-
-
Chris Lattner authored
llvm-svn: 129319
-
- Apr 08, 2011
-
-
Devang Patel authored
llvm-svn: 129114
-
- Apr 07, 2011
-
-
Devang Patel authored
llvm-svn: 129078
-
Devang Patel authored
llvm-svn: 129041
-
Devang Patel authored
llvm-svn: 129035
-
- Mar 30, 2011
- Mar 15, 2011
-
-
Eli Friedman authored
of pointers in an std::map. llvm-svn: 127650
-
- Mar 09, 2011
-
-
Eli Friedman authored
reachable uses, but there still might be uses in dead blocks. Use the standard solution of replacing all the uses with undef. This is a rare case because it's very sensitive to phase ordering in SimplifyCFG. llvm-svn: 127299
-
- Feb 28, 2011
-
-
Frits van Bommel authored
Based on a patch by Alistair Lynn. llvm-svn: 126647
-
- Feb 25, 2011
-
-
Benjamin Kramer authored
Yes, there are other types than i8* and GEPs on them can produce an add+multiply. We don't consider that cheap enough to be speculatively executed. llvm-svn: 126481
-
Benjamin Kramer authored
llvm-svn: 126452
-
- Feb 24, 2011
-
-
Benjamin Kramer authored
llvm-svn: 126445
-
- Feb 07, 2011
-
-
Benjamin Kramer authored
SimplifyCFG: Track the number of used icmps when turning a icmp chain into a switch. If we used only one icmp, don't turn it into a switch. Also prevent the switch-to-icmp transform from creating identity adds, noticed by Marius Wachtler. llvm-svn: 125056
-
- Feb 03, 2011
-
-
Benjamin Kramer authored
SimplifyCFG: Also transform switches that represent a range comparison but are not sorted into sub+icmp. This transforms another 1000 switches in gcc.c. llvm-svn: 124826
-
- Feb 02, 2011
-
-
Benjamin Kramer authored
This makes the job of the later optzn passes easier, allowing the vast amount of icmp transforms to chew on it. We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting binary on i386-linux. The testcase from README.txt now compiles into decl %edi cmpl $3, %edi sbbl %eax, %eax andl $1, %eax ret llvm-svn: 124724
-
- Jan 29, 2011
-
-
Evan Cheng authored
llvm-svn: 124526
-
Evan Cheng authored
llvm-svn: 124522
-
Evan Cheng authored
Re-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional predecessor to enable TCE on demand. llvm-svn: 124518
-
- Jan 28, 2011
-
-
Evan Cheng authored
llvm-svn: 124478
-
Evan Cheng authored
branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. llvm-svn: 124462
-
- Jan 11, 2011
-
-
Frits van Bommel authored
Factor the actual simplification out of SimplifyIndirectBrOnSelect and into a new helper function so it can be reused in e.g. an upcoming SimplifySwitchOnSelect. No functional change. llvm-svn: 123234
-
- 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
-