aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IVUsers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-2/+2
| | | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a newline, now that Value's operator<< doesn't print one.Dan Gohman2009-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75568 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,Dan Gohman2009-07-131-1/+1
| | | | | | | | | | | using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75519 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all SCEV* to SCEV *.Dan Gohman2009-07-071-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74918 91177308-0d34-0410-b5e6-96231b3b80d8
* SCEVHandle is no more!Owen Anderson2009-06-221-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73906 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't (unconditionally) use getSCEVAtScope to simplify the stepDan Gohman2009-06-191-1/+0
| | | | | | | | | expression in IVUsers, because in the case of a use of a non-linear addrec outside of a loop, this causes the addrec to be evaluated as a linear addrec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73774 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the code from IVUsers that attempted to handleDan Gohman2009-06-181-27/+3
| | | | | | | | | | | | 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
* Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.Dan Gohman2009-06-151-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73401 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid getting a compiler warningDuncan Sands2009-05-131-1/+1
| | | | | | | | | IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’: IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function with gcc-4.3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71654 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the code for collecting IV users out of LSR into an IVUsers class,Dan Gohman2009-05-121-0/+391
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