summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IVUsers.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of testing whether an instruction dominates the loop preheader,Dan Gohman2009-09-271-3/+3
| | | | | | | | | test whether it properly dominates the loop header. This is equivalent when the loop has a preheader, and has the advantage of working when the loop doesn't have a preheader. Since IVUsers doesn't Require LoopSimplify, the loop isn't guaranteed to have a preheader. llvm-svn: 82899
* Remove a redundant #include.Dan Gohman2009-09-271-1/+0
| | | | llvm-svn: 82897
* remove a few dead insertion methods.Chris Lattner2009-08-241-5/+0
| | | | llvm-svn: 79882
* remove a few DOUTs here and there.Chris Lattner2009-08-231-1/+1
| | | | llvm-svn: 79832
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-4/+4
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Fix more missing newlines.Dan Gohman2009-08-171-2/+2
| | | | llvm-svn: 79244
* 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. llvm-svn: 77019
* Add a newline, now that Value's operator<< doesn't print one.Dan Gohman2009-07-141-0/+1
| | | | llvm-svn: 75568
* 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. llvm-svn: 75519
* Change all SCEV* to SCEV *.Dan Gohman2009-07-071-14/+14
| | | | llvm-svn: 74918
* SCEVHandle is no more!Owen Anderson2009-06-221-14/+14
| | | | llvm-svn: 73906
* 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. llvm-svn: 73774
* 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. llvm-svn: 73706
* Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.Dan Gohman2009-06-151-9/+9
| | | | llvm-svn: 73401
* 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. llvm-svn: 71654
* 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. llvm-svn: 71535
OpenPOWER on IntegriCloud