Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | cache results of operator* | Gabor Greif | 2010-07-12 | 1 | -21/+31 |
| | | | | llvm-svn: 108142 | ||||
* | if jump threading is able to infer interesting values on both | Chris Lattner | 2010-07-12 | 1 | -2/+13 |
| | | | | | | | | the LHS and RHS of an and/or instruction, don't multiply add known predecessor values. This fixes the crash on testcase from PR7498 llvm-svn: 108114 | ||||
* | jump threading can't split a critical edge from an indirectbr. This | Chris Lattner | 2010-06-14 | 1 | -1/+6 |
| | | | | | | fixes PR7356. llvm-svn: 105950 | ||||
* | Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of | Dan Gohman | 2010-05-28 | 1 | -0/+1 |
| | | | | | | | lib/Transforms/Utils and into lib/Analysis so that Analysis passes can use them. llvm-svn: 104949 | ||||
* | fix PR6743, a case where we'd delete an instruction before using it | Chris Lattner | 2010-04-10 | 1 | -1/+3 |
| | | | | | | in some cases. llvm-svn: 100937 | ||||
* | There are two ways of checking for a given type, for example isa<PointerType>(T) | Duncan Sands | 2010-02-16 | 1 | -2/+2 |
| | | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344 | ||||
* | Uniformize the names of type predicates: rather than having isFloatTy and | Duncan Sands | 2010-02-15 | 1 | -1/+1 |
| | | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223 | ||||
* | Make jump threading honor x|undef -> true and x&undef -> false, | Chris Lattner | 2010-02-11 | 1 | -3/+8 |
| | | | | | | instead of considering x|undef -> x, which may not be true. llvm-svn: 95850 | ||||
* | third bug from PR6119: the xor dupe extension allows | Chris Lattner | 2010-01-23 | 1 | -2/+2 |
| | | | | | | | | for arbitrary terminators in predecessors, don't assume it is a conditional or uncond branch. The testcase shows an example where they can happen with switches. llvm-svn: 94323 | ||||
* | add an early out to ProcessBranchOnXOR to speed it up, | Chris Lattner | 2010-01-23 | 1 | -0/+25 |
| | | | | | | | | handle the case when we can infer an input to the xor from all inputs that agree, instead of going into an infinite loop. Another part of PR6199 llvm-svn: 94321 | ||||
* | fix a crash in jump threading, PR6119 | Chris Lattner | 2010-01-23 | 1 | -0/+6 |
| | | | | llvm-svn: 94319 | ||||
* | 1) Use the new SimplifyInstructionsInBlock routine instead of the copy | Chris Lattner | 2010-01-12 | 1 | -17/+14 |
| | | | | | | | | | | | | in JT. 2) When cloning blocks for PHI or xor conditions, use instsimplify to simplify the code as we go. This allows us to squish common cases early in JT which opens up opportunities for subsequent iterations, and allows it to completely simplify the testcase. llvm-svn: 93253 | ||||
* | tidy up | Chris Lattner | 2010-01-12 | 1 | -5/+1 |
| | | | | llvm-svn: 93222 | ||||
* | Teach jump threading to duplicate small blocks when the branch | Chris Lattner | 2010-01-12 | 1 | -9/+123 |
| | | | | | | | | | | | | | | | | | | | condition is a xor with a phi node. This eliminates nonsense like this from 176.gcc in several places: LBB166_84: testl %eax, %eax - setne %al - xorb %cl, %al - notb %al - testb $1, %al - je LBB166_85 + je LBB166_69 + jmp LBB166_85 This is rdar://7391699 llvm-svn: 93221 | ||||
* | some cleanup, and make it obvious that ProcessJumpOnPHI only works | Chris Lattner | 2010-01-11 | 1 | -24/+14 |
| | | | | | | on branches by renaming it and checking for a branch at the call site. llvm-svn: 93208 | ||||
* | Use a do-while loop instead of while + boolean. | Benjamin Kramer | 2010-01-07 | 1 | -6/+4 |
| | | | | llvm-svn: 92912 | ||||
* | Change errs() to dbgs(). | David Greene | 2010-01-05 | 1 | -25/+25 |
| | | | | llvm-svn: 92614 | ||||
* | Metadata.h doesn't need to include ValueHandle.h anymore. | Chris Lattner | 2009-12-28 | 1 | -0/+1 |
| | | | | llvm-svn: 92211 | ||||
* | fix PR5698 | Chris Lattner | 2009-12-06 | 1 | -0/+5 |
| | | | | llvm-svn: 90708 | ||||
* | fix PR5640 by tracking whether a block is the header of a loop more | Chris Lattner | 2009-12-01 | 1 | -3/+9 |
| | | | | | | precisely, which prevents us from infinitely peeling the loop. llvm-svn: 90211 | ||||
* | make PRE of loads preserve the alignment of the moved load instruction. | Chris Lattner | 2009-11-15 | 1 | -5/+8 |
| | | | | llvm-svn: 88865 | ||||
* | fix a bug handling 'not x' when x is undef. | Chris Lattner | 2009-11-15 | 1 | -2/+3 |
| | | | | llvm-svn: 88864 | ||||
* | use getPredicateOnEdge to fold comparisons through PHI nodes, | Chris Lattner | 2009-11-12 | 1 | -1/+11 |
| | | | | | | | which implements GCC PR18046. This also gets us 360 more jump threads on 176.gcc. llvm-svn: 86953 | ||||
* | various fixes to the lattice transfer functions. | Chris Lattner | 2009-11-12 | 1 | -0/+6 |
| | | | | llvm-svn: 86952 | ||||
* | switch jump threading to use getPredicateOnEdge in one place | Chris Lattner | 2009-11-12 | 1 | -10/+13 |
| | | | | | | | | making the new LVI stuff smart enough to subsume some special cases in the old code. Disable them when LVI is around, the testcase still passes. llvm-svn: 86951 | ||||
* | with the new code we can thread non-instruction values. This | Chris Lattner | 2009-11-12 | 1 | -1/+6 |
| | | | | | | allows us to handle the test10 testcase. llvm-svn: 86924 | ||||
* | this argument can be an arbitrary value, it doesn't need to be an instruction. | Chris Lattner | 2009-11-12 | 1 | -4/+3 |
| | | | | llvm-svn: 86923 | ||||
* | expose edge information and switch j-t to use it. | Chris Lattner | 2009-11-12 | 1 | -2/+2 |
| | | | | llvm-svn: 86920 | ||||
* | pass TD into a SimplifyCmpInst call. Add another case that | Chris Lattner | 2009-11-11 | 1 | -3/+24 |
| | | | | | | uses LVI info when -enable-jump-threading-lvi is passed. llvm-svn: 86886 | ||||
* | stub out some LazyValueInfo interfaces, and have JumpThreading | Chris Lattner | 2009-11-11 | 1 | -18/+45 |
| | | | | | | | | start using them in a trivial way when -enable-jump-threading-lvi is passed. enable-jump-threading-lvi will be my playground for awhile. llvm-svn: 86789 | ||||
* | add a fixme | Chris Lattner | 2009-11-11 | 1 | -0/+4 |
| | | | | llvm-svn: 86766 | ||||
* | implement a TODO by teaching jump threading about "xor x, 1". | Chris Lattner | 2009-11-10 | 1 | -2/+14 |
| | | | | llvm-svn: 86739 | ||||
* | move some generally useful functions out of jump threading | Chris Lattner | 2009-11-10 | 1 | -83/+0 |
| | | | | | | into libanalysis and transformutils. llvm-svn: 86735 | ||||
* | improve comment. | Chris Lattner | 2009-11-10 | 1 | -2/+5 |
| | | | | llvm-svn: 86723 | ||||
* | Make jump threading eliminate blocks that just contain phi nodes, | Chris Lattner | 2009-11-10 | 1 | -0/+21 |
| | | | | | | | | debug intrinsics, and an unconditional branch when possible. This reuses the TryToSimplifyUncondBranchFromEmptyBlock function split out of simplifycfg. llvm-svn: 86722 | ||||
* | make jump threading recursively simplify expressions instead of doing it | Chris Lattner | 2009-11-10 | 1 | -20/+42 |
| | | | | | | | | | | | | | | | | | | | just one level deep. On the testcase we go from getting this: F1: ; preds = %T2 %F = and i1 true, %cond ; <i1> [#uses=1] br i1 %F, label %X, label %Y to a fully threaded: F1: ; preds = %T2 br label %Y This changes gets us to the point where we're forming (too many) switch instructions on doug's strswitch testcase. llvm-svn: 86646 | ||||
* | don't invalidate PN, rewrite of this code is in progress anyway. | Chris Lattner | 2009-11-10 | 1 | -4/+5 |
| | | | | llvm-svn: 86639 | ||||
* | add a new SimplifyInstruction API, which is like ConstantFoldInstruction, | Chris Lattner | 2009-11-10 | 1 | -6/+5 |
| | | | | | | | | except that the result may not be a constant. Switch jump threading to use it so that it gets things like (X & 0) -> 0, which occur when phi preds are deleted and the remaining phi pred was a zero. llvm-svn: 86637 | ||||
* | rename SimplifyCompare -> SimplifyCmpInst and split it into | Chris Lattner | 2009-11-09 | 1 | -1/+1 |
| | | | | | | | Simplify[IF]Cmp pieces. Add some predicates to CmpInst to determine whether a predicate is fp or int. llvm-svn: 86624 | ||||
* | use instructionsimplify instead of a weak clone of ad-hoc folding stuff. | Chris Lattner | 2009-11-09 | 1 | -22/+2 |
| | | | | llvm-svn: 86616 | ||||
* | stub out a new form of BasicBlock::RemovePredecessorAndSimplify which | Chris Lattner | 2009-11-09 | 1 | -5/+65 |
| | | | | | | | simplifies instruction users of PHIs when the phi is eliminated. This will be moved to transforms/utils after some other refactoring. llvm-svn: 86603 | ||||
* | comment typos pointed out by Duncan | Chris Lattner | 2009-11-09 | 1 | -3/+3 |
| | | | | llvm-svn: 86497 | ||||
* | reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix | Chris Lattner | 2009-11-07 | 1 | -243/+363 |
| | | | | | | | | | (making pred factoring only happen if threading is guaranteed to be successful). This now survives an X86-64 bootstrap of llvm-gcc. llvm-svn: 86355 | ||||
* | Revert following patches to fix llvmgcc bootstrap. | Devang Patel | 2009-11-07 | 1 | -350/+234 |
| | | | | | | | 86289, 86278, 86270, 86267, 86266 & 86264 Chris, please take a look. llvm-svn: 86321 | ||||
* | Avoid "ambiguous 'else'" warning from gcc. | Jeffrey Yasskin | 2009-11-07 | 1 | -1/+2 |
| | | | | llvm-svn: 86314 | ||||
* | Fix a bug where we'd call SplitBlockPredecessors with a pred in the | Chris Lattner | 2009-11-06 | 1 | -2/+11 |
| | | | | | | set only once even if it has multiple edges to BB. llvm-svn: 86299 | ||||
* | Remove function left over from other jump threading cleanup. | Eli Friedman | 2009-11-06 | 1 | -24/+0 |
| | | | | llvm-svn: 86289 | ||||
* | Fix a problem discovered on self host. | Chris Lattner | 2009-11-06 | 1 | -1/+1 |
| | | | | llvm-svn: 86278 | ||||
* | remove more code subsumed by r86264 | Chris Lattner | 2009-11-06 | 1 | -83/+17 |
| | | | | llvm-svn: 86270 | ||||
* | eliminate some more code subsumed by r86264 | Chris Lattner | 2009-11-06 | 1 | -41/+4 |
| | | | | llvm-svn: 86267 |