summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Restore dump() methods to Loop and MachineLoop.Dan Gohman2010-01-051-0/+5
| | | | llvm-svn: 92772
* Add Loop contains utility methods for testing whether a loopDan Gohman2009-12-181-1/+1
| | | | | | | | contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. llvm-svn: 91654
* Make getUniqueExitBlocks's precondition assert more precise, toDan Gohman2009-12-111-3/+3
| | | | | | avoid spurious failures. This fixes PR5758. llvm-svn: 91147
* Teach getSmallConstantTripMultiple about Shl operators.Dan Gohman2009-11-201-0/+5
| | | | llvm-svn: 89426
* Minor tidiness fixes.Dan Gohman2009-11-091-4/+3
| | | | llvm-svn: 86565
* Factor out the predicate code for loopsimplify form exit blocks intoDan Gohman2009-11-051-6/+8
| | | | | | a separate helper function. llvm-svn: 86159
* Fix another place that calls Loop::contains a lot to construct a sortedDan Gohman2009-10-201-1/+4
| | | | | | | | container of the blocks and do efficient lookups. This makes isLoopSimplifyForm much faster on large loops, fixing a significant compile-time issue in builds with assertions enabled. llvm-svn: 84673
* Move the dominator verification code out of special code embedded withinDan Gohman2009-09-281-0/+21
| | | | | | | | | | | | 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. llvm-svn: 82952
* Re-apply r80926, with fixes: keep the domtree informed of new blocksDan Gohman2009-09-081-0/+10
| | | | | | | | | | | | | | | that get created during loop unswitching, and fix SplitBlockPredecessors' LCSSA updating code to create new PHIs instead of trying to just move existing ones. Also, optimize Loop::verifyLoop, since it gets called a lot. Use searches on a sorted list of blocks instead of calling the "contains" function, as is done in other places in the Loop class, since "contains" does a linear search. Also, don't call verifyLoop from LoopSimplify or LCSSA, as the PassManager is already calling verifyLoop as part of LoopInfo's verifyAnalysis. llvm-svn: 81221
* Revert r80926. It causes loop unswitch assertion and slow down some JIT ↵Evan Cheng2009-09-061-10/+0
| | | | | | tests significantly. llvm-svn: 81101
* Smallvectorize switchExitBlocks.Dan Gohman2009-09-031-1/+1
| | | | llvm-svn: 80942
* Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verifyDan Gohman2009-09-031-0/+10
| | | | | | | | | that these passes are properly preserved. Fix several transformation passes that claimed to preserve LoopSimplify form but weren't. llvm-svn: 80926
* Move getUniqueExitBlocks from LoopBase to Loop, since they depend onDan Gohman2009-09-031-0/+68
| | | | | | | LoopSimplify form, which is currently only available on Loops (and not MachineLoops). Also, move the code out of the header file. llvm-svn: 80923
* remove uses of llvm/Support/Streams.h.Chris Lattner2009-08-231-1/+0
| | | | llvm-svn: 79838
* Change Pass::print to take a raw ostream instead of std::ostream,Chris Lattner2009-08-231-3/+2
| | | | | | update all code that this affects. llvm-svn: 79830
* eliminate the std::ostream form of WriteAsOperand and update clients.Chris Lattner2009-08-231-0/+6
| | | | | | This also updates dominator related stuff. llvm-svn: 79825
* Replace isTrapping with a new, similar method called Eli Friedman2009-07-171-7/+2
| | | | | | | | | | isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. llvm-svn: 76150
* Add an isLoopSimplifyForm() predicate, following the example ofDan Gohman2009-07-161-0/+24
| | | | | | | isLCSSAForm(), to test whether a loop is in the form guaranteed by the LoopSimplify pass. llvm-svn: 76077
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-151-4/+7
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Introduce a new LoopInfo utility function makeLoopInvariant, whichDan Gohman2009-07-141-1/+62
| | | | | | | | | | | works similar to isLoopInvariant, except that it will do trivial hoisting to try to make the value loop invariant if it isn't already. This makes it easier for transformation passes to clear trivial instructions out of the way (the regular LICM pass doesn't run until relatively late). This is code factored out of LoopSimplify and other places. llvm-svn: 75578
* Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,Dan Gohman2009-07-131-0/+178
| | | | | | | | and related functions out of LoopBase and into Loop, since they are specific to BasicBlock-based loops. This also allows the code to be moved out-of-line. llvm-svn: 75523
* Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.Dan Gohman2009-06-271-1/+1
| | | | llvm-svn: 74394
* Remove some unnecessary #includes.Dan Gohman2009-06-051-1/+0
| | | | llvm-svn: 72948
* Change the description string of the LoopInfo pass.Dan Gohman2009-05-011-1/+1
| | | | | | | "Construction" makes it sound like a pass that might modify the CFG to construct natural loops. llvm-svn: 70580
* Remove dead comments.Evan Cheng2008-12-181-3/+0
| | | | llvm-svn: 61201
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-3/+0
| | | | llvm-svn: 50695
* These passes preserve CFG.Devang Patel2008-03-201-1/+1
| | | | | | This patch fixes Benchmarks/Trimaran/enc-pc1/enc-pc1 failure reported by Grawp-PIC i386 nightly tester llvm-svn: 48623
* Restore isCFGOnly property of various analysis passes.Devang Patel2008-03-201-1/+1
| | | | llvm-svn: 48579
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-191-1/+1
| | | | llvm-svn: 48554
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-271-1/+1
| | | | | | This involves a small interface change. llvm-svn: 44348
* More templatization.Owen Anderson2007-11-151-230/+1
| | | | llvm-svn: 44158
* Start the process of making MachineLoopInfo possible by templating Loop.Owen Anderson2007-11-141-396/+0
| | | | llvm-svn: 44097
* Use SmallVector.Devang Patel2007-08-211-3/+3
| | | | llvm-svn: 41230
* No need to hardcode SmallVector size.Devang Patel2007-08-211-3/+3
| | | | llvm-svn: 41228
* Use SmallVector instead of std::vector.Devang Patel2007-08-211-3/+3
| | | | llvm-svn: 41207
* Verify loop info.Devang Patel2007-07-191-1/+12
| | | | llvm-svn: 40062
* Use DominatorTree instead of ETForest.Devang Patel2007-06-081-9/+9
| | | | llvm-svn: 37507
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-1/+1
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+1
| | | | llvm-svn: 36632
* Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.Chris Lattner2007-03-041-9/+7
| | | | llvm-svn: 34900
* For PR950:Reid Spencer2006-12-231-8/+10
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-1/+1
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Removed some of the iostream #includes. Moved towards converting to usingBill Wendling2006-11-281-2/+3
| | | | | | llvm streams llvm-svn: 31983
* add a methodChris Lattner2006-10-281-0/+20
| | | | llvm-svn: 31249
* Do not rely on std::sort and std::erase to get list of uniqueDevang Patel2006-08-291-0/+53
| | | | | | | | exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. llvm-svn: 29966
* Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29921
* Make Loop::getExitBlocks significantly faster for large loops. Instead ofChris Lattner2006-08-121-3/+9
| | | | | | | | pounding on Loop::contains (which is O(n) in the size of the loop), use a sorted vector, which is O(log(N)) for each query. This speeds up Duraid's horrible testcase from ~72s to ~31s in a debug build. llvm-svn: 29645
* Speed up Loop::isLCSSAForm by using a binary search and single-entry cache.Chris Lattner2006-08-021-6/+14
| | | | | | This reduces LCSSA pass time from 1.5s to 0.96s when run on eon in release+asserts mode. llvm-svn: 29464
OpenPOWER on IntegriCloud