[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-28 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.73 -> 1.74 --- Log message: Do not filter loop if candidate branch is in loop header. --- Diffs of the changes: (+0 -2) LoopUnswitch.cpp |2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Transforms/Scal

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-27 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.72 -> 1.73 --- Log message: - Undo previous check and allow loop switch for condtion that is not inside loop. - Avoid loop unswich for loop header branch. - While cloning dominators fix typo and handle self dominating

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-27 Thread Devang Patel
On Jun 27, 2007, at 5:52 PM, Chris Lattner wrote: >> If a condition is not inside a loop then the condition is suitable >> to loop unswitch candidate for the loop. > > I don't understand, why reject unswitching on these values? > > cases like this should be unswitched: > > int foo(int arg) { >

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-27 Thread Chris Lattner
> If a condition is not inside a loop then the condition is suitable > to loop unswitch candidate for the loop. I don't understand, why reject unswitching on these values? cases like this should be unswitched: int foo(int arg) { for (..) if (arg) ... } -Chris > > --- > Diffs of

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-27 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.71 -> 1.72 --- Log message: Update LoopUnswitch pass to preserve DomiantorTree. --- Diffs of the changes: (+55 -32) LoopUnswitch.cpp | 87 ++- 1 files changed,

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-27 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.70 -> 1.71 --- Log message: If a condition is not inside a loop then the condition is suitable to loop unswitch candidate for the loop. --- Diffs of the changes: (+7 -0) LoopUnswitch.cpp |7 +++ 1 files ch

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-06-05 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.69 -> 1.70 --- Log message: Avoid non-trivial loop unswitching while optimizing for size. --- Diffs of the changes: (+12 -3) LoopUnswitch.cpp | 15 --- 1 files changed, 12 insertions(+), 3 deletions(

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-05-09 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.68 -> 1.69 --- Log message: Fix PR1333: http://llvm.org/PR1333 Testcases : http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-2

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-03-06 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.64 -> 1.65 --- Log message: Now LoopUnswitch is a LoopPass. --- Diffs of the changes: (+17 -86) LoopUnswitch.cpp | 103 +-- 1 files changed, 17 insertions(+), 8

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-02-26 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.62 -> 1.63 --- Log message: Use efficient container SmallPtrSet --- Diffs of the changes: (+4 -3) LoopUnswitch.cpp |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scal

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-02-26 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.61 -> 1.62 --- Log message: Do not unswitch loop on same value again and again. --- Diffs of the changes: (+7 -0) LoopUnswitch.cpp |7 +++ 1 files changed, 7 insertions(+) Index: llvm/lib/Transforms/Sca

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2007-01-12 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.56 -> 1.57 --- Log message: fix a bug in a recent patch --- Diffs of the changes: (+1 -1) LoopUnswitch.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-08-30 Thread Devang Patel
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.46 -> 1.47 --- Log message: Do not rely on std::sort and std::erase to get list of unique exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. --- Diffs of the cha

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-07-18 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.44 -> 1.45 --- Log message: Fix a error that hadn't yet cause any problems, but I'm sure it would have somewhere down the road. --- Diffs of the changes: (+1 -1) LoopUnswitch.cpp |2 +- 1 files changed, 1 inse

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-28 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.43 -> 1.44 --- Log message: Switch to a very conservative heuristic for determining when loop-unswitching will be profitable. This is mainly to remove some cases where excessive unswitching would result in long compil

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-28 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.42 -> 1.43 --- Log message: Don't unswitch really large loops even if they are mostly filled with empty blocks. --- Diffs of the changes: (+6 -0) LoopUnswitch.cpp |6 ++ 1 files changed, 6 insertions(+)

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-27 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.41 -> 1.42 --- Log message: Fix for 2006-06-27-DeadSwitchCase.ll Be more careful when updating Phi nodes after eliminating dead switch cases. Fix proposed by Chris. --- Diffs of the changes: (+6 -5) LoopUnswitc

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-26 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.40 -> 1.41 --- Log message: Make LoopUnswitch able to unswitch loops with live-out values by taking advantage of LCSSA. This results several times the number of unswitchings occurring on tests such and timberwolfmc,

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-13 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.39 -> 1.40 --- Log message: Fix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitch bug exposed by the recent lcssa work. --- Diffs of the changes: (+13 -1) LoopUnswitch.cpp | 14 +-

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-12 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.38 -> 1.39 --- Log message: Reapply my 6/9 changes. The bug Evan saw no longer occurs. --- Diffs of the changes: (+7 -1) LoopUnswitch.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index:

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-11 Thread Evan Cheng
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.37 -> 1.38 --- Log message: Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others). --- Diffs of the changes: (+0 -4) LoopUnswitch.cpp |4 1 files changed, 4

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-06-09 Thread Owen Anderson
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.36 -> 1.37 --- Log message: Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves LCSSA. --- Diffs of the changes: (+4 -0) LoopUnswitch.cpp |4 1 files changed, 4 insertions

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-03-23 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.35 -> 1.36 --- Log message: add the actual cost to the debug info --- Diffs of the changes: (+4 -2) LoopUnswitch.cpp |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Sca

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-22 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.34 -> 1.35 --- Log message: Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, which caused SPASS to fail building last night. We can't trivially unswitch a loop if the exit block has phi nodes in it,

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-21 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.33 -> 1.34 --- Log message: Add some comments, simplify some code, and fix a bug that caused rewriting to rewrite with the wrong value. --- Diffs of the changes: (+26 -34) LoopUnswitch.cpp | 60 +

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-17 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.32 -> 1.33 --- Log message: improved support for branch folding, still not enabled. --- Diffs of the changes: (+269 -143) LoopUnswitch.cpp | 412 +++ 1 files ch

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-17 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.31 -> 1.32 --- Log message: Implement deletion of dead blocks, currently disabled. --- Diffs of the changes: (+75 -28) LoopUnswitch.cpp | 103 --- 1 files chang

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-17 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.30 -> 1.31 --- Log message: a previous patch completely disabled trivial unswitching, this fixees it. Thanks to nate for pointing this out :) --- Diffs of the changes: (+0 -1) LoopUnswitch.cpp |1 - 1 files ch

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-17 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.29 -> 1.30 --- Log message: initial trivial support for folding branches that have now-constant destinations. --- Diffs of the changes: (+34 -3) LoopUnswitch.cpp | 37 ++--- 1 fi

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-17 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.28 -> 1.29 --- Log message: When unswitching a loop, make sure to update loop info with exit blocks in the right loop. --- Diffs of the changes: (+4 -2) LoopUnswitch.cpp |6 -- 1 files changed, 4 insertio

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-16 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.27 -> 1.28 --- Log message: Fix loops where the header has an exit, fixing a loop-unswitch crash on crafty --- Diffs of the changes: (+15 -13) LoopUnswitch.cpp | 28 +++- 1 files changed,

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-16 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.26 -> 1.27 --- Log message: start of some new simplification code, not thoroughly tested, use at your own risk :) --- Diffs of the changes: (+161 -14) LoopUnswitch.cpp | 175 ++

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-16 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.25 -> 1.26 --- Log message: Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. Apparently they do different things :) This fixes a testcase that nate reduced from spass. Also included are a

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-15 Thread Jeff Cohen
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.24 -> 1.25 --- Log message: Fix VC++ warning. --- Diffs of the changes: (+0 -1) LoopUnswitch.cpp |1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transf

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-15 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.23 -> 1.24 --- Log message: fix a bug where we unswitched the wrong way --- Diffs of the changes: (+2 -2) LoopUnswitch.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-15 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.22 -> 1.23 --- Log message: Implement trivial unswitching for switch stmts. This allows us to trivial unswitch this loop on 2 before sweating to unswitch on 1/3. void test4(int N, int i, int C, int*P, int*Q) { int

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-15 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.21 -> 1.22 --- Log message: make "trivial" unswitching significantly more general. It can now handle this for example: for (j = 0; j < N; ++j) { // trivial unswitch if (C) P[i+j] = 0; } turning it

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-15 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.20 -> 1.21 --- Log message: Checking the wrong value. This caused us to emit silly code like Y = seteq bool X, true instead of just using X :) --- Diffs of the changes: (+1 -1) LoopUnswitch.cpp |2 +- 1 file

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-14 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.19 -> 1.20 --- Log message: more refactoring, no functionality change. --- Diffs of the changes: (+11 -12) LoopUnswitch.cpp | 23 +++ 1 files changed, 11 insertions(+), 12 deletions(-) Inde

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-14 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.18 -> 1.19 --- Log message: pull some code out into a function --- Diffs of the changes: (+28 -18) LoopUnswitch.cpp | 46 -- 1 files changed, 28 insertions(+), 18 dele

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-13 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.17 -> 1.18 --- Log message: Use statistics to keep track of what flavors of loops we are unswitching --- Diffs of the changes: (+19 -7) LoopUnswitch.cpp | 26 +++--- 1 files changed, 19 inser

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-10 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.16 -> 1.17 --- Log message: implement unswitching of loops with switch stmts and selects in them --- Diffs of the changes: (+135 -94) LoopUnswitch.cpp | 229 ---

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-10 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.15 -> 1.16 --- Log message: Update PHI nodes in successors of exit blocks. --- Diffs of the changes: (+34 -5) LoopUnswitch.cpp | 39 ++- 1 files changed, 34 insertions(+), 5 d

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-10 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.14 -> 1.15 --- Log message: Reform the unswitching code in terms of edge splitting, not block splitting. --- Diffs of the changes: (+67 -49) LoopUnswitch.cpp | 116 +++-

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-10 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.13 -> 1.14 --- Log message: Fix a case where UnswitchTrivialCondition broke critical edges with phi's in the successors --- Diffs of the changes: (+24 -1) LoopUnswitch.cpp | 25 - 1 file

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.12 -> 1.13 --- Log message: add some notes, move some code around. Implement unswitching of loops with branches on partially invariant computations. --- Diffs of the changes: (+64 -19) LoopUnswitch.cpp | 83 +++

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.11 -> 1.12 --- Log message: Move code around to be more logical, no functionality change. --- Diffs of the changes: (+32 -26) LoopUnswitch.cpp | 58 ++- 1 file

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.10 -> 1.11 --- Log message: When unswitching a trivial loop, do admit we are doing it! :) --- Diffs of the changes: (+7 -0) LoopUnswitch.cpp |7 +++ 1 files changed, 7 insertions(+) Index: llvm/lib/Trans

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.9 -> 1.10 --- Log message: Implement unconditional unswitching of 'trivial' loops, those loops that contain branches in their entry block that control whether or not the loop is a noop or not. --- Diffs of the chang

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.8 -> 1.9 --- Log message: Simplify control flow a bit, note that unswitch preserves canonical loop form --- Diffs of the changes: (+12 -10) LoopUnswitch.cpp | 22 -- 1 files changed, 12 inser

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.7 -> 1.8 --- Log message: Make the threshold a parameter --- Diffs of the changes: (+7 -3) LoopUnswitch.cpp | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/L

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

2006-02-09 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.6 -> 1.7 --- Log message: Simplify the loop-unswitch pass, by not even trying to unswitch loops with uses of loop values outside the loop. We need loop-closed SSA form to do this right, or to use SSA rewriting if we r