summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
Commit message (Collapse)AuthorAgeFilesLines
* Disable LVI while I evaluate a failure.Owen Anderson2010-08-191-1/+1
| | | | llvm-svn: 111551
* Tentatively enabled LVI by default. I'll be monitoring for any failures.Owen Anderson2010-08-191-1/+1
| | | | llvm-svn: 111543
* Process the step before the start, because it's usually the simplerDan Gohman2010-08-191-3/+3
| | | | | | of the two. llvm-svn: 111495
* Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer ↵Owen Anderson2010-08-181-0/+7
| | | | | | issues. llvm-svn: 111382
* Fix PR7755: knowing something about an inval for a predChris Lattner2010-08-181-8/+4
| | | | | | | | | from the LHS should disable reconsidering that pred on the RHS. However, knowing something about the pred on the RHS shouldn't disable subsequent additions on the RHS from happening. llvm-svn: 111349
* remove some dead code.Chris Lattner2010-08-181-3/+2
| | | | llvm-svn: 111344
* remove dead prototype.Chris Lattner2010-08-181-2/+1
| | | | llvm-svn: 111342
* When rotating loops, put the original header at the bottom of theDan Gohman2010-08-171-0/+20
| | | | | | | loop, making the resulting loop significantly less ugly. Also, zap its trivial PHI nodes, since it's easy. llvm-svn: 111255
* Add an option to disable codegen prepare critical edge splitting. In theory, ↵Evan Cheng2010-08-171-6/+14
| | | | | | PHI elimination is already doing all (most?) of the splitting needed. But machine-licm and machine-sink seem to miss some important optimizations when splitting is disabled. llvm-svn: 111224
* Instead of having CollectSubexpr's categorize operands as interesting orDan Gohman2010-08-161-19/+14
| | | | | | | | uninteresting, just put all the operands on one list and make GenerateReassociations make the decision about what's interesting. This is simpler, and it avoids an extra ScalarEvolution::getAddExpr call. llvm-svn: 111133
* Put add operands in ScalarEvolution-canonical order, when convenient.Dan Gohman2010-08-161-2/+2
| | | | | | | This isn't necessary, because ScalarEvolution sorts them anyway, but it's tidier this way. llvm-svn: 111132
* Teach SimplifyCFG how to simplify indirectbr instructions.Dan Gohman2010-08-141-3/+2
| | | | | | | | | | | - Eliminate redundant successors. - Convert an indirectbr with one successor into a direct branch. Also, generalize SimplifyCFG to be able to be run on a function entry block. It knows quite a few simplifications which are applicable to the entry block, and it only needs a few checks to avoid trouble with the entry block. llvm-svn: 111060
* Fix LSR's ExtractImmediate and ExtractSymbol to avoid callingDan Gohman2010-08-131-4/+8
| | | | | | | ScalarEvolution::getAddExpr, which can be pretty expensive, when nothing has changed, which is pretty common. llvm-svn: 111042
* fix PR7876: If ipsccp decides that a function's address is takenChris Lattner2010-08-121-4/+15
| | | | | | before it rewrites the code, we need to use that in the post-rewrite pass. llvm-svn: 110962
* Don't attempt the PRE inline asm calls, since we don't value number them ↵Owen Anderson2010-08-071-0/+5
| | | | | | yet. Fixes PR7835. llvm-svn: 110489
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-0630-33/+33
| | | | llvm-svn: 110460
* Fix uninitialized variable warning.Nick Lewycky2010-08-061-2/+2
| | | | | | | | Also move 'default' case next to a real case to help compiler optimize in non-Debug builds. No functionality change. llvm-svn: 110435
* Revert r110396 to fix buildbots.Owen Anderson2010-08-0630-33/+33
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-0530-33/+33
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Give JumpThreading+LVI a long-form cl::opt so that it's easier to toggle the ↵Owen Anderson2010-08-051-1/+4
| | | | | | default. llvm-svn: 110384
* Experiments show that we can safely increase our unrolling threshold without ↵Owen Anderson2010-08-041-1/+1
| | | | | | | | unduly impacting code size, particularly since unrolling is not enabled at -Os. llvm-svn: 110233
* Fix whitespace.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110223
* Fix a comment.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110181
* Add an atomic lowering passPeter Collingbourne2010-08-032-0/+161
| | | | llvm-svn: 110113
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-021-3/+3
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Add missing newline to debug statement.Nick Lewycky2010-07-301-1/+1
| | | | llvm-svn: 109886
* simplify by using CallSite constructors; virtually eliminates CallSite::get ↵Gabor Greif2010-07-282-7/+8
| | | | | | from the tree llvm-svn: 109687
* use Value* constructor of CallSite to create potentially improper site, and ↵Gabor Greif2010-07-281-2/+1
| | | | | | test that llvm-svn: 109581
* recommit simplification (r109502, backed out r109509); seems to innocentGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109510
* back out this too to restore the botsGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109509
* simplifyGabor Greif2010-07-271-1/+1
| | | | llvm-svn: 109502
* Add an initial implementation of LazyValueInfo updating for JumpThreading. ↵Owen Anderson2010-07-261-0/+3
| | | | | | Disabled for now. llvm-svn: 109424
* Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogusDan Gohman2010-07-262-3/+6
| | | | | | | | | | | | | | dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier pass in StandardPasses.h to ensure that it gets scheduled at the right time. Declare that loop unrolling preserves ScalarEvolution, and shuffle some getAnalysisUsages. This eliminates one LoopSimplify and one LCCSA run in the standard compile opts sequence. llvm-svn: 109413
* Use DominatorTree::properlyDominates instead of dominates with anDan Gohman2010-07-261-1/+1
| | | | | | explicit inequality check. llvm-svn: 109401
* A block dominates itself, by definition.Dan Gohman2010-07-261-1/+1
| | | | llvm-svn: 109400
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-224-5/+5
| | | | llvm-svn: 109103
* undo 80 column trespassing I causedGabor Greif2010-07-222-9/+11
| | | | llvm-svn: 109092
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-2128-47/+51
| | | | llvm-svn: 109045
* Remember that the induction variable is always a PHINode andDan Gohman2010-07-201-4/+4
| | | | | | | use getIncomingValueForBlock instead of LoopInfo::getCanonicalInductionVariableIncrement. llvm-svn: 108865
* Reorder the contents of various getAnalysisUsage functions, eliminatingDan Gohman2010-07-162-6/+6
| | | | | | a redundant loopsimplify run from the default -O2 sequence. llvm-svn: 108539
* eliminate CallInst::ArgOffsetGabor Greif2010-07-162-5/+5
| | | | llvm-svn: 108522
* Don't merge uses when they are targetting fixup sites withDan Gohman2010-07-151-1/+20
| | | | | | | | | | | | | different widths. In a use with a narrower fixup, formulae may be wider than the fixup, in which case the high bits aren't necessarily meaningful, so it isn't safe to reuse them for uses with wider fixups. This fixes PR7618, though the testcase is too large for a reasonable regression test, since it heavily dependes on hitting LSR's heuristics in a certain way. llvm-svn: 108455
* Use dbgs() instead of errs() in a DEBUG.Dan Gohman2010-07-151-1/+1
| | | | llvm-svn: 108453
* Watch out for a constant offset cancelling out a base register, formingDan Gohman2010-07-151-2/+9
| | | | | | | a zero. This situation arrises in Fortran code with induction variables that start at 1 instead of 0. This fixes PR7651. llvm-svn: 108424
* Handle the case of a tail recursion in which the tail call is followedDuncan Sands2010-07-131-13/+35
| | | | | | | | | by a return that returns a constant, while elsewhere in the function another return instruction returns a different constant. This is a special case of accumulator recursion, so just generalize the existing logic a bit. llvm-svn: 108241
* cache results of operator*Gabor Greif2010-07-121-21/+31
| | | | llvm-svn: 108142
* cache dereferenced iteratorsGabor Greif2010-07-121-2/+3
| | | | llvm-svn: 108138
* recommit r108131 (hich has been backed out in r108135) with a fixGabor Greif2010-07-121-2/+3
| | | | llvm-svn: 108137
* back out r108131 (of TailDuplication.cpp) for now, it causes a buildbot failureGabor Greif2010-07-121-5/+4
| | | | llvm-svn: 108135
* cache dereferenced iteratorsGabor Greif2010-07-122-7/+9
| | | | llvm-svn: 108131
OpenPOWER on IntegriCloud