summaryrefslogtreecommitdiff
path: root/lib/Analysis/LoopPass.cpp
Commit message (Collapse)AuthorAge
* zap dead code.Chris Lattner2010-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113073 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111199; it breaks -debug-pass=Structure output.Dan Gohman2010-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111500 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dumpPassStructure be a PMDataManager abstraction, rather thanDan Gohman2010-08-16
| | | | | | | | | | | a Pass abstraction, since that's the level it's actually used at. Rename Pass' dumpPassStructure to dumpPass. This eliminates an awkward use of getAsPass() to convert a PMDataManager* into a Pass* just to permit a dumpPassStructure call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111199 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LoopPass::getContainedPass return a LoopPass* instead of a Pass*Dan Gohman2010-08-11
| | | | | | | and remove casts from all its callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110848 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Ok, third time's the charm. No changes from last time except the CMakeDavid Greene2010-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source addition. Apparently the buildbots were wrong about failures. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100249 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 100204. It broke a bunch of tests and apparently changed what passes ↵Evan Cheng2010-04-02
| | | | | | are run during codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100207 91177308-0d34-0410-b5e6-96231b3b80d8
* Let's try this again. Re-apply 100143 including an apparent missingDavid Greene2010-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <string> include. For some reason the buildbot choked on this while my builds did not. It's probably due to a difference in system headers. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100204 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r100143.Eric Christopher2010-04-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100146 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some switches helpful for debugging:David Greene2010-04-01
| | | | | | | | | | | | | | | | | | | | | | | | -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100143 91177308-0d34-0410-b5e6-96231b3b80d8
* s/getNameStr/getName/Benjamin Kramer2010-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100011 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply my timer rewrite with a change for PassManager to store Chris Lattner2010-03-30
| | | | | | | timers by pointer instead of by-value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99871 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r99862 which is causing FNT failures.Chris Lattner2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99870 91177308-0d34-0410-b5e6-96231b3b80d8
* fairly major rewrite of various timing related stuff.Chris Lattner2010-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99862 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch more unneeded dynamic_cast's.Chris Lattner2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94156 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this debug output to handle the case where the loop has been deleted.Dan Gohman2009-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82994 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the name of the loop header in debug messages.Dan Gohman2009-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82993 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-28
| | | | | | | | | | | | | the PassManager code into a regular verifyAnalysis method. Also, reorganize loop verification. Make the LoopPass infrastructure call verifyLoop as needed instead of having LoopInfo::verifyAnalysis check every loop in the function after each looop pass. Add a new command-line argument, -verify-loop-info, to enable the expensive full checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82952 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this assert to check the condition as soon as it is known.Dan Gohman2009-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82951 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the StartPassTimer and StopPassTimer functions so that theDan Gohman2009-09-28
| | | | | | | | | code that stops the timer doesn't have to search to find the timer object before it stops the timer. This avoids a lock acquisition and a few other things done with the timer running. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82949 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an old copy+pasto.Dan Gohman2009-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82947 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract the code for inserting a loop into the loop queue intoDan Gohman2009-09-27
| | | | | | | a separate function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82946 91177308-0d34-0410-b5e6-96231b3b80d8
* When a loop is deleted, immediately release all of the activeDan Gohman2009-09-27
| | | | | | | | | LoopPasses for that loop. This avoids trouble with the PassManager trying to call verifyAnalysis on them, and frees up some memory sooner rather than later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82945 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a bogus comment.Dan Gohman2009-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82908 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to verify a LoopPass analysis if the loop has been deleted.Dan Gohman2009-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80919 91177308-0d34-0410-b5e6-96231b3b80d8
* convert LoopInfo.h and GraphWriter.h to use raw_ostreamChris Lattner2009-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79836 91177308-0d34-0410-b5e6-96231b3b80d8
* Call doInitialization(), releaseMemory(), and doFinalization() for ↵Torok Edwin2009-06-29
| | | | | | | | | | | on-the-fly passes as well. Also don't call finalizers for LoopPass if initialization was not called. Add a unittest that tests that these methods are called, in the proper order, and the correct number of times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74438 91177308-0d34-0410-b5e6-96231b3b80d8
* Before deleting a basic block, give other loop passes a chance cleanup ↵Devang Patel2009-03-25
| | | | | | analysis values, related to the instructions in the basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67719 91177308-0d34-0410-b5e6-96231b3b80d8
* Sprinkle some PrettyStackEntry magic into the passmanager. With this, we nowChris Lattner2009-03-06
| | | | | | | | | | | | | | | | | | get nice and happy stack traces when we crash in an optimizer or codegen. For example, an abort put in UnswitchLoops now looks like this: Stack dump: 0. Program arguments: clang pr3399.c -S -O3 1. <eof> parser at end of file 2. per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'pr3399.c'. 4. Running pass 'Loop Pass Manager' on function '@foo' 5. Running pass 'Unswitch loops' on basic block '%for.inc' Abort git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66260 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to ScalarEvolution for telling it when a loop has beenDan Gohman2009-02-17
| | | | | | | | | | | | modified in a way that may effect the trip count calculation. Change IndVars to use this method when it rewrites pointer or floating-point induction variables instead of using a doInitialization method to sneak these changes in before ScalarEvolution has a chance to see the loop. This eliminates the need for LoopPass to depend on ScalarEvolution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64810 91177308-0d34-0410-b5e6-96231b3b80d8
* Move dumpPassStructure out of line.Dan Gohman2009-02-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64796 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't call getAnalysisUsage unless -debug-pass is enabled. This speedsChris Lattner2008-08-08
| | | | | | | up the passmgr by avoiding useless work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54528 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling of "hierarchy" in comments.Dan Gohman2008-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53489 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of inherited analysis (e.g. dominator tree).Devang Patel2008-07-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53088 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in comments. Devang Patel2008-07-01
| | | | | | | Thanks for the feedback! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52978 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dom info verifier.Devang Patel2008-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52967 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-03
| | | | | | | of comparing begin() and end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42585 91177308-0d34-0410-b5e6-96231b3b80d8
* ooops...Devang Patel2007-09-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42118 91177308-0d34-0410-b5e6-96231b3b80d8
* - Use correct header for SCEV inside LoopPass.cppAnton Korobeynikov2007-08-20
| | | | | | | - Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41197 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce Simple Analysis interface for loop passes.Devang Patel2007-07-31
| | | | | | | Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40625 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify loop info.Devang Patel2007-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40062 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace mysterious code causing a g++-4.2 warningDuncan Sands2007-07-19
| | | | | | | with hopefully correct code that pleases g++-4.2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40051 91177308-0d34-0410-b5e6-96231b3b80d8
* Add loop info verification mechanism.Devang Patel2007-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37822 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8