- Jul 15, 2008
-
-
Owen Anderson authored
llvm-svn: 53616
-
Owen Anderson authored
Have GVN do a pre-pass over the CFG that folds away unconditional branches where possible. This allows local PRE to be more aggressive. llvm-svn: 53615
-
Matthijs Kooijman authored
again canonicalizes {i32} into i32 and {} into void. llvm-svn: 53610
-
Matthijs Kooijman authored
return value as a whole in deadargelim is really not needed now that we simply rebuild the old return value and actually prevents some canonicalization from taking place. This revert stops deadargelim from changing {i32} into i32 for now, but I'll fix that next. llvm-svn: 53609
-
Matthijs Kooijman authored
return values that are still (partially) live. Instead of updating all uses of a call instruction after removing some elements, it now just rebuilds the original struct (With undef gaps where the unused values were) and leaves it to instcombine to clean this up. The added testcase still fails currently, but this is due to instcombine which isn't good enough yet. I will fix that part next. llvm-svn: 53608
-
Matthijs Kooijman authored
llvm-svn: 53607
-
Matthijs Kooijman authored
only the liveness of partial return values (for functions returning a struct). This is more explicit to prevent unwanted changes in the return value. In particular, deadargelim now canonicalizes a function returning {i32} to returning i32 and {} to void, if the struct returned is not used in its entirety, but only the single element is used. llvm-svn: 53606
-
Matthijs Kooijman authored
and return values live for those functions. This doesn't change anything yet, but prepares for the coming commits. llvm-svn: 53601
-
Matthijs Kooijman authored
llvm-svn: 53600
-
Matthijs Kooijman authored
RetOrArg::getDescription() as const. llvm-svn: 53599
-
Matthijs Kooijman authored
llvm-svn: 53598
-
Matthijs Kooijman authored
llvm-svn: 53592
-
Matthijs Kooijman authored
method, to slightly simplify control flow. llvm-svn: 53591
-
- Jul 14, 2008
-
-
Dan Gohman authored
llvm-svn: 53564
-
Chris Lattner authored
llvm-svn: 53557
-
Duncan Sands authored
llvm-svn: 53549
-
Chris Lattner authored
a hack around the fact that we don't represent the CFG correctly for sj/lj. It fixes PR2486. llvm-svn: 53540
-
Chris Lattner authored
llvm-svn: 53538
-
Chris Lattner authored
disproving a condition. This actually compiles the existing testcase (udiv_select_to_select_shift) to: define i64 @test(i64 %X, i1 %Cond) { entry: %divisor1.t = lshr i64 %X, 3 ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %divisor1.t, %quotient2 ; <i64> [#uses=1] ret i64 %sum } instead of: define i64 @test(i64 %X, i1 %Cond) { entry: %quotient1.v = select i1 %Cond, i64 3, i64 4 ; <i64> [#uses=1] %quotient1 = lshr i64 %X, %quotient1.v ; <i64> [#uses=1] %quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1] %sum = add i64 %quotient1, %quotient2 ; <i64> [#uses=1] ret i64 %sum } llvm-svn: 53534
-
Chris Lattner authored
fixes PR2540. llvm-svn: 53533
-
Chris Lattner authored
No functionality change. llvm-svn: 53532
-
- Jul 13, 2008
-
-
Chris Lattner authored
llvm-svn: 53531
-
Chris Lattner authored
No functionality change. llvm-svn: 53530
-
Chris Lattner authored
llvm-svn: 53528
-
Chris Lattner authored
llvm-svn: 53527
-
Chris Lattner authored
conditionals and commenting the code better. No functionality change. llvm-svn: 53526
-
- Jul 12, 2008
-
-
Nick Lewycky authored
Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an 'and' instruction. llvm-svn: 53506
-
- Jul 11, 2008
-
-
Dan Gohman authored
llvm-svn: 53474
-
Owen Anderson authored
llvm-svn: 53470
-
Nick Lewycky authored
llvm-svn: 53454
-
Nick Lewycky authored
llvm-svn: 53452
-
Nick Lewycky authored
similar. llvm-svn: 53451
-
Chris Lattner authored
llvm-svn: 53449
-
Chris Lattner authored
llvm-svn: 53448
-
Chris Lattner authored
llvm-svn: 53447
-
Chris Lattner authored
the min/max values for an integer type, compare against the min/max values we can prove contain the input. This might be a tighter bound, so this is general goodness. llvm-svn: 53446
-
Chris Lattner authored
handle them in some code. llvm-svn: 53445
-
Chris Lattner authored
was using the algorithm for folding unsigned comparisons which is completely wrong. This has been broken since the signless types change. llvm-svn: 53444
-
Chris Lattner authored
This cause a regression in InstCombine/JavaCompare, which was doing the right thing on accident. To handle the missed case, generalize the comparisons based on masked bits a little bit to handle comparisons against the max value. For example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4) llvm-svn: 53443
-
- Jul 10, 2008
-
-
Matthijs Kooijman authored
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of dependencies between return values and/or arguments. Also make the handling of arguments and return values the same. The pass now looks properly inside returned structs, but only at the first level (ie, not inside nested structs). This version fixed a few more bugs and was cleaned up a bit. It now passes all of LLVM's testing, and should still pass SPEC2006. There is still a minor bug with regard to returning nested structs. Since there is currently nothing that emits such IR, I will fix that in a seperate commit (partly because it requires a non-trivial fix). llvm-svn: 53400
-