aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/IVUsers.h
Commit message (Collapse)AuthorAgeFilesLines
* Reapply LoopStrengthReduce and IVUsers cleanups, excluding the partDan Gohman2009-12-181-1/+1
| | | | | | | | | of 91296 that caused trouble -- the Processed list needs to be preserved for the livetime of the pass, as AddUsersIfInteresting is called from other passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91641 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently ↵Evan Cheng2009-12-171-1/+1
| | | | | | introduced a non-deterministic behavior in the optimizer somewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91598 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the IVUses member private.Dan Gohman2009-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91291 91177308-0d34-0410-b5e6-96231b3b80d8
* - Teach LSR to avoid changing cmp iv stride if it will create an immediate thatEvan Cheng2009-11-121-0/+7
| | | | | | | | | | | | | | | cannot be folded into target cmp instruction. - Avoid a phase ordering issue where early cmp optimization would prevent the later count-to-zero optimization. - Add missing checks which could cause LSR to reuse stride that does not have users. - Fix a bug in count-to-zero optimization code which failed to find the pre-inc iv's phi node. - Remove, tighten, loosen some incorrect checks disable valid transformations. - Quite a bit of code clean up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86969 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a few dead insertion methods.Chris Lattner2009-08-241-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79882 91177308-0d34-0410-b5e6-96231b3b80d8
* Match declaration to definition.Daniel Dunbar2009-07-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75440 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all SCEV* to SCEV *.Dan Gohman2009-07-071-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74918 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct format for LLVM header #includes.Misha Brukman2009-07-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74620 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEVHandle is no more!Owen Anderson2009-06-221-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73906 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the code from IVUsers that attempted to handleDan Gohman2009-06-181-18/+5
| | | | | | | | | | | | casted induction variables in cases where the cast isn't foldable. It ended up being a pessimization in many cases. This could be fixed, but it would require a bunch of complicated code in IVUsers' clients. The advantages of this approach aren't visible enough to justify it at this time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73706 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the code for collecting IV users out of LSR into an IVUsers class,Dan Gohman2009-05-121-0/+235
and generalize it so that it can be used by IndVarSimplify. Implement the base IndVarSimplify transformation code using IVUsers. This removes TestOrigIVForWrap and associated code, as ScalarEvolution now has enough builtin overflow detection and folding logic to handle all the same cases, and more. Run "opt -iv-users -analyze -disable-output" on your favorite loop for an example of what IVUsers does. This lets IndVarSimplify eliminate IV casts and compute trip counts in more cases. Also, this happens to finally fix the remaining testcases in PR1301. Now that IndVarSimplify is being more aggressive, it occasionally runs into the problem where ScalarEvolutionExpander's code for avoiding duplicate expansions makes it difficult to ensure that all expanded instructions dominate all the instructions that will use them. As a temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function to fix up instructions inserted by SCEVExpander. Fortunately, this code is contained, and can be easily removed once a more comprehensive solution is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71535 91177308-0d34-0410-b5e6-96231b3b80d8