summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Various optimizations. Don't compare two loops' depthsDan Gohman2010-08-131-18/+26
| | | | | | | when they are the same loop. Don't compare two instructions' loop depths when they are in the same block. llvm-svn: 111045
* When testing whether one loop contains another, test this directlyDan Gohman2010-08-131-2/+2
| | | | | | rather than testing whether the loop contains the other's header. llvm-svn: 111039
* Add a const.Dan Gohman2010-08-131-1/+1
| | | | llvm-svn: 111038
* When creating a symmetric SCEV with a constant operand, putDan Gohman2010-08-131-4/+4
| | | | | | | the constant operand on the left, as that's where ScalarEvolution will end up canonicalizing to. llvm-svn: 111037
* An add recurrence is loop-invariant in any loop inside of itsDan Gohman2010-08-131-0/+4
| | | | | | | associated loop. This avoids potentially expensive traversals of the add recurrence's operands. llvm-svn: 111034
* Optimize ScalarEvolution::getAddExpr's operand factoring code byDan Gohman2010-08-121-4/+7
| | | | | | | | having it finish processing all of the muliply operands before starting the whole getAddExpr process over again, instead of immediately after the first simplification. llvm-svn: 110916
* Hoist some loop-invariant code out of a hot loop.Dan Gohman2010-08-121-2/+4
| | | | llvm-svn: 110915
* Optimize ScalarEvolution::getAddExpr's duplicate operand detectionDan Gohman2010-08-121-3/+7
| | | | | | | | by having it finish processing the whole operand list before starting the whole getAddExpr process over again, instead of immediately after the first duplicate is found. llvm-svn: 110914
* When analyzing loop exit conditions combined with and and or, don'tDan Gohman2010-08-111-14/+12
| | | | | | | make any assumptions about when the two conditions will agree on when to permit the loop to exit. This fixes PR7845. llvm-svn: 110758
* Rename and reorder the arguments to isImpliedCond, for consistency and clarity.Dan Gohman2010-08-101-10/+12
| | | | llvm-svn: 110750
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix a minor bug which resulted in intermediate calculationsDan Gohman2010-08-041-1/+1
| | | | | | using wider types than are necessary. llvm-svn: 110241
* Make SCEVUnknown a CallbackVH, so that it can be notified directlyDan Gohman2010-08-021-47/+46
| | | | | | | | | | | of Value deletions and RAUWs, instead of relying on ScalarEvolution's Scalars map being notified, as that's complicated at best, and insufficient in general. This means SCEVUnknown needs a non-trivial destructor, so introduce a mechanism to allow ScalarEvolution to locate all the SCEVUnknowns. llvm-svn: 110086
* Prefix `next' iterator operation with `llvm::'.Oscar Fuentes2010-08-021-2/+2
| | | | | | | | Fixes potential ambiguity problems on VS 2010. Patch by nobled! llvm-svn: 110029
* Speculatively revert r109705 since it seems to be causing some build botEric Christopher2010-07-291-45/+29
| | | | | | angst. llvm-svn: 109718
* Factor out some of the code for updating old SCEVUnknown values, andDan Gohman2010-07-291-29/+45
| | | | | | | | | extend it to handle the case where multiple RAUWs affect a single SCEVUnknown. Add a ScalarEvolution unittest to test for this situation. llvm-svn: 109705
* Make SCEVCallbackVH::allUsesReplacedWith update the old SCEVUnknownDan Gohman2010-07-281-22/+39
| | | | | | | | | | | | object, as it may still be referenced by SCEVs not cleaned up by the use list traversal. Also, in ScalarEvolution::forgetValue, only check for a SCEVUnknown object for the original value, not for any value in the use list, because other SCEVUnknown values aren't necessary obsolete at that point. llvm-svn: 109570
* Make SCEVCallbackVH::allUsesReplacedWith unconditionally deleteDan Gohman2010-07-281-12/+6
| | | | | | the old value. llvm-svn: 109567
* Micro-optimize SCEVComplexityCompare.Dan Gohman2010-07-231-34/+44
| | | | llvm-svn: 109267
* Add a const qualifier.Dan Gohman2010-07-231-2/+2
| | | | llvm-svn: 109266
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109103
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Add a fast path for x - x.Dan Gohman2010-07-201-0/+4
| | | | llvm-svn: 108855
* Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef.Dan Gohman2010-07-151-0/+14
| | | | | | This helps LSR behave more consistently on bugpoint-reduced testcases. llvm-svn: 108451
* In ScalarEvolution::forgetValue, eliminate any SCEVUnknownDan Gohman2010-06-301-0/+20
| | | | | | | | | | | entries associated with the value being erased in the folding set map. These entries used to be harmless, because a SCEVUnknown doesn't store any information about its Value*, so having a new Value allocated at the old Value's address wasn't a problem. But now that ScalarEvolution is storing more information about values, this is no longer safe. llvm-svn: 107316
* Revert the part of r107257 which introduced new logic for usingDan Gohman2010-06-301-82/+11
| | | | | | | nsw and nuw flags from IR Instructions. On further consideration, this isn't valid. llvm-svn: 107298
* Improve ScalarEvolution's nsw and nuw preservation.Dan Gohman2010-06-301-31/+105
| | | | llvm-svn: 107257
* When computing a new ConservativeResult, intersect it withDan Gohman2010-06-301-1/+2
| | | | | | the old one instead of replacing it, to be more precise. llvm-svn: 107256
* Fix ScalarEvolution's tripcount computation for chains of loopsDan Gohman2010-06-291-41/+61
| | | | | | | where each loop's induction variable's start value is the exit value of a preceding loop. llvm-svn: 107224
* Just as its not safe to blindly transfer the nsw bit from an addDan Gohman2010-06-291-5/+9
| | | | | | | | instruction to an add scev, it's not safe to blindly transfer the inbounds flag from a gep instruction to an nsw on the scev for the gep. llvm-svn: 107117
* Eliminate a redundant FoldingSet lookup.Dan Gohman2010-06-251-3/+3
| | | | llvm-svn: 106872
* Don't try to preserve pointer types in SCEVConstants; the old codeDan Gohman2010-06-241-12/+8
| | | | | | was over-complicated. llvm-svn: 106760
* Make the trunc code consistent with the zext and sext code in itsDan Gohman2010-06-241-1/+2
| | | | | | handling of pointer types. llvm-svn: 106757
* Replace ScalarEvolution's private copy of getLoopPredecessorDan Gohman2010-06-221-19/+2
| | | | | | with LoopInfo's public copy. llvm-svn: 106603
* Allow "exhaustive" trip count evaluation on phi nodes with allDan Gohman2010-06-221-9/+7
| | | | | | constant operands. llvm-svn: 106537
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-211-7/+6
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoidDan Gohman2010-06-191-2/+5
| | | | | | | | assuming that loops are in canonical form, as ScalarEvolution doesn't depend on LoopSimplify itself. Also, with indirectbr not all loops can be simplified. This fixes PR7416. llvm-svn: 106389
* Revert r106304 (105548 and friends), which are the SCEVComplexityCompareDan Gohman2010-06-181-38/+138
| | | | | | optimizations. There is still some nondeterminism remaining. llvm-svn: 106306
* Reapply 105540, 105542, and 105548, and revert r105732.Dan Gohman2010-06-181-138/+38
| | | | llvm-svn: 106304
* Reapply 105546.Dan Gohman2010-06-181-7/+13
| | | | llvm-svn: 106302
* Reapply 105544.Dan Gohman2010-06-181-2/+2
| | | | llvm-svn: 106301
* Remove getIntegerSCEV; it's redundant with getConstant, and getConstantDan Gohman2010-06-181-7/+0
| | | | | | is more consistent with the ConstantInt API. llvm-svn: 106281
* Simplify this code.Dan Gohman2010-06-171-11/+3
| | | | llvm-svn: 106254
* Revert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.Evan Cheng2010-06-091-53/+147
| | | | llvm-svn: 105740
* The FoldingSet hash data includes pointer values, so it isn'tDan Gohman2010-06-071-21/+28
| | | | | | | determinstic. Instead, give SCEV objects an arbitrary sequence number. llvm-svn: 105548
* Optimize this code somewhat by taking advantage of the factDan Gohman2010-06-071-7/+13
| | | | | | that the operands are sorted. llvm-svn: 105546
* Micro-optimize this, to speed up this hotspot in debug builds a little.Dan Gohman2010-06-071-2/+2
| | | | llvm-svn: 105544
* Micro-optimize this.Dan Gohman2010-06-071-2/+4
| | | | llvm-svn: 105542
OpenPOWER on IntegriCloud