aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/LoopInfo.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Clarify the definition of "latch block" in a comment.Dan Gohman2009-02-181-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64916 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a utility function to LoopInfo to return the exit blockDan Gohman2009-02-121-0/+10
| | | | | | | | when the loop has exactly one exit, and make use of it in LoopIndexSplit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64388 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify some code by using blocks_begin(), blocks_end(), andDan Gohman2009-02-071-9/+5
| | | | | | | | the iterator typedefs instead of handling the std::vector directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64016 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the logic of getting hold of a PHI predecessor block.Gabor Greif2009-01-231-2/+1
| | | | | | | | | There is now a direct way from value-use-iterator to incoming block in PHINode's API. This way we avoid the iterator->index->iterator trip, and especially the costly getOperandNo() invocation. Additionally there is now an assertion that the iterator really refers to one of the PHI's Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62869 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the time regression I introduced in 464.h264ref withDale Johannesen2009-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my earlier patch to this file. The issue there was that all uses of an IV inside a loop are actually references to Base[IV*2], and there was one use outside that was the same but LSR didn't see the base or the scaling because it didn't recurse into uses outside the loop; thus, it used base+IV*scale mode inside the loop instead of pulling base out of the loop. This was extra bad because register pressure later forced both base and IV into memory. Doing that recursion, at least enough to figure out addressing modes, is a good idea in general; the change in AddUsersIfInteresting does this. However, there were side effects.... It is also possible for recursing outside the loop to introduce another IV where there was only 1 before (if the refs inside are not scaled and the ref outside is). I don't think this is a common case, but it's in the testsuite. It is right to be very aggressive about getting rid of such introduced IVs (CheckForIVReuse and the handling of nonzero RewriteFactor in StrengthReduceStridedIVUsers). In the testcase in question the new IV produced this way has both a nonconstant stride and a nonzero base, neither of which was handled before. And when inserting new code that feeds into a PHI, it's right to put such code at the original location rather than in the PHI's immediate predecessor(s) when the original location is outside the loop (a case that couldn't happen before) (RewriteInstructionToUseNewBase); better to avoid making multiple copies of it in this case. Also, the mechanism for keeping SCEV's corresponding to GEP's no longer works, as the GEP might change after its SCEV is remembered, invalidating the SCEV, and we might get a bad SCEV value when looking up the GEP again for a later loop. This also couldn't happen before, as we weren't recursing into GEP's outside the loop. Also, when we build an expression that involves a (possibly non-affine) IV from a different loop as well as an IV from the one we're interested in (containsAddRecFromDifferentLoop), don't recurse into that. We can't do much with it and will get in trouble if we try to create new non-affine IVs or something. More testcases are coming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62212 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
* Use find instead of lower_bound.Dan Gohman2008-07-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2008-07-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53179 91177308-0d34-0410-b5e6-96231b3b80d8
* Move RemoveFromVector out of the global namespace.Dan Gohman2008-05-141-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51090 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the loop unroll mechanism logic out into a utility function.Dan Gohman2008-05-141-0/+53
| | | | | | | Patch by Matthijs Kooijman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51083 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove uses of llvm/System/IncludeFile.h that are no longer needed.Dan Gohman2008-05-061-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50695 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused function.Devang Patel2008-05-051-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50664 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-251-2/+2
| | | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
* PassInfo keep tracks whether a pass is an analysis pass or not.Devang Patel2008-03-191-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48554 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use virtual function to identify an analysis pass.Devang Patel2008-03-191-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48520 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of compilation warnings. Per Devang.Dale Johannesen2008-03-181-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48478 91177308-0d34-0410-b5e6-96231b3b80d8
* Identify Analysis pass.Devang Patel2008-03-181-0/+3
| | | | | | | | Do not run analysis pass again if analysis info is still available. This fixes PR1441. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48476 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the block cloner which fixes bugpoint on code using unwind_to (phew!)Nick Lewycky2008-03-091-2/+2
| | | | | | | and also update the cloning interface's major user, the loop optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48088 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-1/+2
| | | | | | annoying warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a check if the initial value of the induction variable is 0 (the method ↵Wojciech Matyjewicz2008-02-091-6/+10
| | | | | | comment says it should be). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46907 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments describing what the loop depth values mean. Also, make aDan Gohman2008-01-291-4/+9
| | | | | | | minor simplification to the loop depth calculation code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46511 91177308-0d34-0410-b5e6-96231b3b80d8
* Move typedef of loop to top of the file where it is more obvious.Chris Lattner2008-01-111-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45857 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80 col violationsChris Lattner2008-01-111-29/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45856 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoWojciech Matyjewicz2008-01-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45595 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes for MachineLoopInfo, mostly from Evan. With these, it should be ↵Owen Anderson2007-12-011-5/+5
| | | | | | almost useable! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44480 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MachineLoopInfo. This is not yet tested.Owen Anderson2007-11-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44384 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. ↵Owen Anderson2007-11-271-37/+70
| | | | | | This involves a small interface change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44348 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a leak. Destroy LoopInfoBase object. releaseMemory() is actually ↵Anton Korobeynikov2007-11-251-1/+1
| | | | | | called in its dtor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44317 91177308-0d34-0410-b5e6-96231b3b80d8
* More templatization.Owen Anderson2007-11-151-37/+333
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44158 91177308-0d34-0410-b5e6-96231b3b80d8
* Start the process of making MachineLoopInfo possible by templating Loop.Owen Anderson2007-11-141-42/+346
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44097 91177308-0d34-0410-b5e6-96231b3b80d8
* Add empty() member functions to a few container-like classes.Dan Gohman2007-10-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42487 91177308-0d34-0410-b5e6-96231b3b80d8
* No need to hardcode SmallVector size.Devang Patel2007-08-211-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41228 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SmallVector instead of std::vector.Devang Patel2007-08-211-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41207 91177308-0d34-0410-b5e6-96231b3b80d8
* Change casts from old style to new style. This helps document the detailsReid Spencer2007-08-121-1/+1
| | | | | | | | better, gives the compiler a chance to validate the cast and reduces warnings if the user turns on -Wold-style-cast option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41033 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify loop info.Devang Patel2007-07-191-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40062 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DominatorTree instead of ETForest.Devang Patel2007-06-081-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37507 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | 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-021-1/+1
| | | | | | | | 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-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-171-6/+7
| | | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-2/+2
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for llvm streams.Bill Wendling2006-11-281-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31982 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2006-11-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
* add a methodChris Lattner2006-10-281-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31249 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not rely on std::sort and std::erase to get list of uniqueDevang Patel2006-08-291-0/+6
| | | | | | | | | exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29966 91177308-0d34-0410-b5e6-96231b3b80d8