Lines Matching refs:InnerLoop

35 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop,
70 static CmpInst *getInnerLoopGuardCmp(const Loop &InnerLoop) { in getInnerLoopGuardCmp() argument
72 BranchInst *InnerGuard = InnerLoop.getLoopGuardBranch(); in getInnerLoopGuardCmp()
103 bool LoopNest::arePerfectlyNested(const Loop &OuterLoop, const Loop &InnerLoop, in arePerfectlyNested() argument
105 return (analyzeLoopNestForPerfectNest(OuterLoop, InnerLoop, SE) == in arePerfectlyNested()
110 const Loop &OuterLoop, const Loop &InnerLoop, ScalarEvolution &SE) { in analyzeLoopNestForPerfectNest() argument
113 assert(!InnerLoop.isOutermost() && "Inner loop should have a parent"); in analyzeLoopNestForPerfectNest()
115 << "' and '" << InnerLoop.getName() in analyzeLoopNestForPerfectNest()
124 if (!checkLoopsStructure(OuterLoop, InnerLoop, SE)) { in analyzeLoopNestForPerfectNest()
138 CmpInst *InnerLoopGuardCmp = getInnerLoopGuardCmp(InnerLoop); in analyzeLoopNestForPerfectNest()
163 const BasicBlock *InnerLoopPreHeader = InnerLoop.getLoopPreheader(); in analyzeLoopNestForPerfectNest()
169 !containsOnlySafeInstructions(*InnerLoop.getExitBlock())) { in analyzeLoopNestForPerfectNest()
176 << InnerLoop.getName() << "' are perfectly nested.\n"); in analyzeLoopNestForPerfectNest()
182 const Loop &OuterLoop, const Loop &InnerLoop, ScalarEvolution &SE) { in getInterveningInstructions() argument
184 switch (analyzeLoopNestForPerfectNest(OuterLoop, InnerLoop, SE)) { in getInterveningInstructions()
208 CmpInst *InnerLoopGuardCmp = getInnerLoopGuardCmp(InnerLoop); in getInterveningInstructions()
227 const BasicBlock *InnerLoopPreHeader = InnerLoop.getLoopPreheader(); in getInterveningInstructions()
228 const BasicBlock *InnerLoopExitBlock = InnerLoop.getExitBlock(); in getInterveningInstructions()
270 const Loop *InnerLoop = SubLoops->front(); in getMaxPerfectDepth() local
271 if (!arePerfectlyNested(*CurrentLoop, *InnerLoop, SE)) { in getMaxPerfectDepth()
275 << InnerLoop->getName() << "'\n"; in getMaxPerfectDepth()
280 CurrentLoop = InnerLoop; in getMaxPerfectDepth()
315 static bool checkLoopsStructure(const Loop &OuterLoop, const Loop &InnerLoop, in checkLoopsStructure() argument
319 (InnerLoop.getParentLoop() != &OuterLoop)) in checkLoopsStructure()
323 if (!OuterLoop.isLoopSimplifyForm() || !InnerLoop.isLoopSimplifyForm()) in checkLoopsStructure()
328 const BasicBlock *InnerLoopPreHeader = InnerLoop.getLoopPreheader(); in checkLoopsStructure()
329 const BasicBlock *InnerLoopLatch = InnerLoop.getLoopLatch(); in checkLoopsStructure()
330 const BasicBlock *InnerLoopExit = InnerLoop.getExitBlock(); in checkLoopsStructure()
334 InnerLoop.getExitingBlock() != InnerLoopLatch || !InnerLoopExit) in checkLoopsStructure()
369 if (!BI || BI != InnerLoop.getLoopGuardBranch()) in checkLoopsStructure()
421 &LoopNest::skipEmptyBlockUntil(InnerLoop.getExitBlock(), in checkLoopsStructure()
423 (&LoopNest::skipEmptyBlockUntil(InnerLoop.getExitBlock(), in checkLoopsStructure()