mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-27 13:40:43 +00:00
0a65caa64f
step, and loop induction variable. Summary: This PR extends the loop object with more utilities to get loop bounds, step, and loop induction variable. There already exists passes which try to obtain the loop induction variable in their own pass, e.g. loop interchange. It would be useful to have a common area to get these information. /// Example: /// for (int i = lb; i < ub; i+=step) /// <loop body> /// --- pseudo LLVMIR --- /// beforeloop: /// guardcmp = (lb < ub) /// if (guardcmp) goto preheader; else goto afterloop /// preheader: /// loop: /// i1 = phi[{lb, preheader}, {i2, latch}] /// <loop body> /// i2 = i1 + step /// latch: /// cmp = (i2 < ub) /// if (cmp) goto loop /// exit: /// afterloop: /// /// getBounds /// getInitialIVValue --> lb /// getStepInst --> i2 = i1 + step /// getStepValue --> step /// getFinalIVValue --> ub /// getCanonicalPredicate --> '<' /// getDirection --> Increasing /// getInductionVariable --> i1 /// getAuxiliaryInductionVariable --> {i1} /// isCanonical --> false Reviewers: kbarton, hfinkel, dmgreen, Meinersbur, jdoerfert, syzaara, fhahn Reviewed By: kbarton Subscribers: tvvikram, bmahjour, etiotto, fhahn, jsji, hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D60565 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362644 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AliasAnalysisTest.cpp | ||
AliasSetTrackerTest.cpp | ||
BasicAliasAnalysisTest.cpp | ||
BlockFrequencyInfoTest.cpp | ||
BranchProbabilityInfoTest.cpp | ||
CallGraphTest.cpp | ||
CaptureTrackingTest.cpp | ||
CFGTest.cpp | ||
CGSCCPassManagerTest.cpp | ||
CMakeLists.txt | ||
DivergenceAnalysisTest.cpp | ||
DomTreeUpdaterTest.cpp | ||
GlobalsModRefTest.cpp | ||
IVDescriptorsTest.cpp | ||
LazyCallGraphTest.cpp | ||
LoopInfoTest.cpp | ||
MemoryBuiltinsTest.cpp | ||
MemorySSATest.cpp | ||
OrderedBasicBlockTest.cpp | ||
OrderedInstructionsTest.cpp | ||
PhiValuesTest.cpp | ||
ProfileSummaryInfoTest.cpp | ||
ScalarEvolutionTest.cpp | ||
SparsePropagation.cpp | ||
TargetLibraryInfoTest.cpp | ||
TBAATest.cpp | ||
UnrollAnalyzerTest.cpp | ||
ValueLatticeTest.cpp | ||
ValueTrackingTest.cpp |