summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix ConstantFoldCompareInstOperands to take the LHS/RHS asChris Lattner2009-11-091-6/+5
| | | | | | individual operands instead of taking a temporary array llvm-svn: 86619
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-061-9/+4
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Reverting 85714, 85715, 85716, which are breaking the buildDouglas Gregor2009-11-011-2/+0
| | | | llvm-svn: 85717
* Add a function to Passes.h to allow clients to create instancesDan Gohman2009-11-011-0/+2
| | | | | | of the ScalarEvolution pass without needing to #include ScalarEvolution.h. llvm-svn: 85716
* Rename forgetLoopBackedgeTakenCount to forgetLoop, because itDan Gohman2009-10-311-8/+8
| | | | | | clears out more information than just the stored backedge taken count. llvm-svn: 85664
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Revert r83606 and add comments explaining why it isn't safe.Dan Gohman2009-10-091-12/+10
| | | | llvm-svn: 83649
* Preserve HasNSW and HasNUW when constructing SCEVs for Add and MulDan Gohman2009-10-091-4/+12
| | | | | | instructions. llvm-svn: 83606
* Add the ability to track HasNSW and HasNUW on more kinds of SCEV expressions.Dan Gohman2009-10-091-12/+22
| | | | llvm-svn: 83601
* Add a properlyDominates member function to ScalarEvolution.Dan Gohman2009-09-271-0/+22
| | | | llvm-svn: 82898
* Teach ScalarEvolution how to reason about no-wrap flags on loopsDan Gohman2009-09-171-15/+37
| | | | | | | | where the induction variable has a non-unit stride, such as {0,+,2}, and there are expressions such as {1,+,2} inside the loop formed with or or add nsw operators. llvm-svn: 82151
* Remove references to expression "handles", which are no longer used.Dan Gohman2009-09-031-1/+1
| | | | llvm-svn: 80918
* Don't use an iterator which is potentially invalidated.Dan Gohman2009-08-311-1/+1
| | | | llvm-svn: 80632
* Extend the ValuesAtScope cache to cover all expressions, not justDan Gohman2009-08-311-20/+24
| | | | | | | | | | | | | | SCEVUnknowns, as the non-SCEVUnknown cases in the getSCEVAtScope code can also end up repeatedly climing through the same expression trees, which can be unusably slow when the trees are very tall. Also, add a quick check for SCEV pointer equality to the main SCEV comparison routine, as the full comparison code can be expensive in the case of large expression trees. These fix compile-time problems in some pathlogical cases. llvm-svn: 80623
* Don't assume that two identical instructions that read from memoryDan Gohman2009-08-251-1/+1
| | | | | | | | will always return the same value. This isn't currently necessary, since this code doesn't currently ever get called under circumstances where it would matter, but it may some day. llvm-svn: 80017
* Teach ScalarEvolution about GlobalAliases.Dan Gohman2009-08-251-0/+3
| | | | llvm-svn: 80014
* remove a few dead insertion methods.Chris Lattner2009-08-241-5/+0
| | | | llvm-svn: 79882
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-4/+0
| | | | | | update all code that this affects. llvm-svn: 79830
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-8/+8
| | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. llvm-svn: 79539
* Various comment and whitespace cleanups.Dan Gohman2009-08-201-5/+5
| | | | llvm-svn: 79533
* Use hasDefinitiveInitializer() instead of testing the same thingDan Gohman2009-08-191-1/+1
| | | | | | | by hand, and fix a few places that were using hasInitializer() that appear to depend on the initializer value. llvm-svn: 79441
* Generalize ScalarEvolution to be able to analyze GEPs whenDan Gohman2009-08-181-36/+164
| | | | | | | | TargetData is not present. It still uses TargetData when available. This generalization also fixed some limitations in the TargetData case; the attached testcase covers this. llvm-svn: 79344
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-10/+12
| | | | llvm-svn: 78948
* Fix copy-pasto.Andreas Bolka2009-08-071-2/+2
| | | | llvm-svn: 78426
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-4/+4
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-6/+5
| | | | llvm-svn: 77494
* Fix wording in comments.Dan Gohman2009-07-271-1/+1
| | | | llvm-svn: 77193
* SCEV objects are no longer reference-counted.Dan Gohman2009-07-251-3/+2
| | | | llvm-svn: 77080
* When attempting to sign-extend an addrec by interpretingDan Gohman2009-07-251-2/+2
| | | | | | | the step value as unsigned, the start value and the addrec itself still need to be treated as signed. llvm-svn: 77078
* Teach ScalarEvolution to make use of no-overflow flags whenDan Gohman2009-07-251-2/+37
| | | | | | analyzing add recurrences. llvm-svn: 77034
* Instead of eagerly creating new SCEVs to replace all SCEVs that areDan Gohman2009-07-251-103/+56
| | | | | | | | | | | | affected after a PHI node has been analyzed, just remove affected SCEVs from the Scalars map, so that they'll be (lazily) recreated as needed. This avoids creating SCEV objects that aren't actually needed. Also, rewrite the associated def-use walking code to be non-recursive and to continue traversing past Instructions that don't have an entry in the Scalars map. llvm-svn: 77032
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-15/+16
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Fix whitespace.Dan Gohman2009-07-241-1/+1
| | | | llvm-svn: 76929
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-31/+32
| | | | llvm-svn: 76702
* Replace the original ad-hoc code for determining whether (v pred w) impliesDan Gohman2009-07-211-104/+197
| | | | | | | | (x pred y) with more thorough code that does more complete canonicalization before resorting to range checks. This helps it find more cases where the canonicalized expressions match. llvm-svn: 76671
* Make the range calculations for addrecs to be more conservative,Dan Gohman2009-07-211-3/+9
| | | | | | | as they aren't currently prepared to handle complicated overflow cases. llvm-svn: 76524
* Whitespace cleanups.Dan Gohman2009-07-211-3/+3
| | | | llvm-svn: 76523
* Minor code simplification.Dan Gohman2009-07-211-1/+1
| | | | llvm-svn: 76521
* Add a comment to clarify why there isn't any code in this spot.Dan Gohman2009-07-201-0/+2
| | | | llvm-svn: 76505
* Remove the code that tried to evaluate whether (A pred B) is knownDan Gohman2009-07-201-42/+0
| | | | | | | by determining if (B pred (B-A)) is known, as it doesn't handle overflow correctly. llvm-svn: 76504
* Minor code simplification.Dan Gohman2009-07-201-1/+1
| | | | llvm-svn: 76496
* The upper argument of ConstantRange is exclusive, not inclusive.Dan Gohman2009-07-201-1/+3
| | | | llvm-svn: 76492
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-9/+4
| | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
* Add a new Operator class, for handling Instructions and ConstantExprsDan Gohman2009-07-171-2/+3
| | | | | | | | | in a convenient manner, factoring out some common code from InstructionCombining and ValueTracking. Move the contents of BinaryOperators.h into Operator.h and use Operator to generalize them to support ConstantExprs as well as Instructions. llvm-svn: 76232
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-6/+6
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Fill in some holes in ScalarEvolution's loop iteration conditionDan Gohman2009-07-161-2/+27
| | | | | | | analysis. This allows indvars to emit a simpler loop trip count expression. llvm-svn: 76085
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-4/+5
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-8/+8
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
OpenPOWER on IntegriCloud