aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ScalarEvolutionExpressions.h
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-1/+1
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-7/+7
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-291-6/+82
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-241-8/+14
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* delinearization of arraysSebastian Pop2013-11-121-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194527 91177308-0d34-0410-b5e6-96231b3b80d8
* remove virtual methods in SCEVApplyRewriter and SCEVParameterRewriterSebastian Pop2013-11-121-46/+94
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194526 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify -Wnon-virtual-dtorMatt Beaumont-Gay2013-02-151-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175324 91177308-0d34-0410-b5e6-96231b3b80d8
* capitalize SCEV to match the current naming conventionSebastian Pop2013-02-151-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175302 91177308-0d34-0410-b5e6-96231b3b80d8
* add ScevApplyRewriterSebastian Pop2013-02-151-0/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175294 91177308-0d34-0410-b5e6-96231b3b80d8
* add SCEVParameterRewriterSebastian Pop2013-02-151-0/+104
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175293 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-101-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary classof()'sSean Silva2012-10-111-14/+0
| | | | | | | isa<> et al. automatically infer when the cast is an upcast (including a self-cast), so these are no longer necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165767 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-1/+1
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEVTraversal: Add a visited set.Andrew Trick2012-07-181-1/+3
| | | | | | Expression trees may be DAGs. Make sure traversal has linear complexity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160426 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor SCEV traversal code so I can use it elsewhere. No functionality.Andrew Trick2012-07-131-0/+67
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160203 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-191-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Added SCEV::NoWrapFlags to manage unsigned, signed, and self wrapAndrew Trick2011-03-141-12/+20
| | | | | | | | | | properties. Added the self-wrap flag for SCEV::AddRecExpr. A slew of temporary FIXMEs indicate the intention of the no-self-wrap flag without changing behavior in this revision. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127590 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SCEV::getType() and SCEV::print non-virtual. Move SCEV::hasOperandDan Gohman2010-11-171-49/+12
| | | | | | | to ScalarEvolution. Delete SCEV::~SCEV. SCEV is no longer virtual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119578 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEV::dominates and properlyDominates to ScalarEvolution.Dan Gohman2010-11-171-28/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119570 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be memberDan Gohman2010-11-171-43/+0
| | | | | | | | functions of ScalarEvolution, in preparation for memoization and other optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119562 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify SCEVAddRecExpr's invariant in ScalarEvolution::getAddRecExprDan Gohman2010-11-171-5/+1
| | | | | | | | instead of in SCEVAddRecExpr's constructor, in preparation for an upcoming change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119554 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111031. The way LLVM defines loop invariance, the property of anDan Gohman2010-08-161-18/+0
| | | | | | | | | | expression being loop invariant is not equivalent to the property of properly dominating the loop header. Other optimizations have also made this optimization less important. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111160 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEVNAryExpr's virtual member functions out of line, and convertDan Gohman2010-08-161-22/+3
| | | | | | | them to iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111140 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement hasComputableLoopEvolution for Add, Mul, and Trunc operators,Dan Gohman2010-08-131-0/+18
| | | | | | | | since they can support trivial implementations. This avoids potentially expensive traversals of the operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111031 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SCEVUnknown a CallbackVH, so that it can be notified directlyDan Gohman2010-08-021-8/+18
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110086 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r109705 since it seems to be causing some build botEric Christopher2010-07-291-18/+3
| | | | | | | angst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109718 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out some of the code for updating old SCEVUnknown values, andDan Gohman2010-07-291-3/+18
| | | | | | | | | | extend it to handle the case where multiple RAUWs affect a single SCEVUnknown. Add a ScalarEvolution unittest to test for this situation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some extra friend declarations to fix a gcc-4.0 compile error.Dan Gohman2010-07-281-0/+1
| | | | | | | This is a temporary fix, until more elaborate changes are ready. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109593 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-07-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109565 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r106304 (105548 and friends), which are the SCEVComplexityCompareDan Gohman2010-06-181-25/+24
| | | | | | | optimizations. There is still some nondeterminism remaining. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106306 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 105540, 105542, and 105548, and revert r105732.Dan Gohman2010-06-181-24/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106304 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.Evan Cheng2010-06-091-25/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105740 91177308-0d34-0410-b5e6-96231b3b80d8
* The FoldingSet hash data includes pointer values, so it isn'tDan Gohman2010-06-071-24/+25
| | | | | | | | determinstic. Instead, give SCEV objects an arbitrary sequence number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105548 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the ability to "intern" FoldingSetNodeID data into aDan Gohman2010-03-181-16/+15
| | | | | | | | | | | | | BumpPtrAllocator-allocated region to allow it to be stored in a more compact form and to avoid the need for a non-trivial destructor call. Use this new mechanism in ScalarEvolution instead of FastFoldingSetNode to avoid leaking memory in the case where a FoldingSetNodeID uses heap storage, and to reduce overall memory usage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98829 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r98755 with a thinko which miscompiled gengtype fixed.Dan Gohman2010-03-181-24/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98793 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 98755, which may be causing trouble.Dan Gohman2010-03-171-26/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98762 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SCEVNAryExpr's operand array from a SmallVector to a plainDan Gohman2010-03-171-24/+26
| | | | | | | | | | | pointer and length, and allocate the arrays in ScalarEvolution's BumpPtrAllocator, so that they get released when their owning SCEV gets released. SCEVs are immutable, so they don't need to worry about operand array resizing. This fixes a memory leak reported in PR6637. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98755 91177308-0d34-0410-b5e6-96231b3b80d8
* Override dominates and properlyDominates for SCEVAddRecExpr, as aDan Gohman2010-02-131-0/+4
| | | | | | | | SCEVAddRecExpr doesn't necessarily dominate blocks merely dominated by all of its operands. This fixes an abort compiling 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96056 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2010-02-101-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95780 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize target-independent folding rules for sizeof to handle moreDan Gohman2010-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | cases, and implement target-independent folding rules for alignof and offsetof. Also, reassociate reassociative operators when it leads to more folding. Generalize ScalarEvolution's isOffsetOf to recognize offsetof on arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr to getOffsetOfExpr, for consistency with analagous ConstantExpr routines. Make the target-dependent folder promote GEP array indices to pointer-sized integers, to make implicit casting explicit and exposed to subsequent folding. And add a bunch of testcases for this new functionality, and a bunch of related existing functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SCEVAllocSizeExpr and SCEVFieldOffsetExpr, and in their placeDan Gohman2010-01-281-94/+11
| | | | | | | | | | | | | | | | | use plain SCEVUnknowns with ConstantExpr::getSizeOf and ConstantExpr::getOffsetOf constants. This eliminates a bunch of special-case code. Also add code for pattern-matching these expressions, for clients that want to recognize them. Move ScalarEvolution's logic for expanding array and vector sizeof expressions into an element count times the element size, to expose the multiplication to subsequent folding, into the regular constant folder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94737 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SCEVAddRecExpr's getType return a pointer type when the addDan Gohman2010-01-191-0/+7
| | | | | | | | has a pointer member. This helps reduce unnecessary bitcasting and uglygeps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93939 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the ability to track HasNSW and HasNUW on more kinds of SCEV expressions.Dan Gohman2009-10-091-9/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83601 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a properlyDominates member function to ScalarEvolution.Dan Gohman2009-09-271-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82898 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix apostrophos.Dan Gohman2009-09-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81856 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-4/+4
| | | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize ScalarEvolution to be able to analyze GEPs whenDan Gohman2009-08-181-2/+90
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79344 91177308-0d34-0410-b5e6-96231b3b80d8