Home | History | Annotate | Download | only in Scalar

Lines Matching refs:LS

540   // Rewrite the iteration space of the loop denoted by (LS, Preheader). The
563 changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
567 // The loop denoted by `LS' has `OldPreheader' as its preheader. This
568 // function creates a new preheader for `LS' and returns it.
570 BasicBlock *createPreheader(const LoopStructure &LS, BasicBlock *OldPreheader,
574 // `changeIterationSpaceEnd' and is the preheader to the loop denoted by `LS'.
575 // This function rewrites the PHI nodes in `LS.Header' to start with the
578 LoopStructure &LS, BasicBlock *ContinuationBlockAndPreheader,
610 LoopConstrainer(Loop &L, LoopInfo &LI, const LoopStructure &LS,
615 MainLoopStructure(LS) {}
968 const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt,
1045 auto BBInsertLocation = std::next(Function::iterator(LS.Latch));
1046 RRI.ExitSelector = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".exit.selector",
1048 RRI.PseudoExit = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".pseudo.exit", &F,
1052 bool Increasing = LS.IndVarIncreasing;
1056 // EnterLoopCond - is it okay to start executing this `LS'?
1058 ? B.CreateICmpSLT(LS.IndVarStart, ExitSubloopAt)
1059 : B.CreateICmpSGT(LS.IndVarStart, ExitSubloopAt);
1061 B.CreateCondBr(EnterLoopCond, LS.Header, RRI.PseudoExit);
1064 LS.LatchBr->setSuccessor(LS.LatchBrExitIdx, RRI.ExitSelector);
1065 B.SetInsertPoint(LS.LatchBr);
1067 Increasing ? B.CreateICmpSLT(LS.IndVarNext, ExitSubloopAt)
1068 : B.CreateICmpSGT(LS.IndVarNext, ExitSubloopAt);
1069 Value *CondForBranch = LS.LatchBrExitIdx == 1
1073 LS.LatchBr->setCondition(CondForBranch);
1081 ? B.CreateICmpSLT(LS.IndVarNext, LS.LoopExitAt)
1082 : B.CreateICmpSGT(LS.IndVarNext, LS.LoopExitAt);
1083 B.CreateCondBr(IterationsLeft, RRI.PseudoExit, LS.LatchExit);
1091 for (Instruction &I : *LS.Header) {
1101 NewPHI->addIncoming(PN->getIncomingValueForBlock(LS.Latch),
1106 RRI.IndVarEnd = PHINode::Create(LS.IndVarNext->getType(), 2, "indvar.end",
1108 RRI.IndVarEnd->addIncoming(LS.IndVarStart, Preheader);
1109 RRI.IndVarEnd->addIncoming(LS.IndVarNext, RRI.ExitSelector);
1112 // `LS.Latch'. The PHI nodes need to be updated to reflect that.
1113 for (Instruction &I : *LS.LatchExit) {
1115 replacePHIBlock(PN, LS.Latch, RRI.ExitSelector);
1124 LoopStructure &LS, BasicBlock *ContinuationBlock,
1128 for (Instruction &I : *LS.Header) {
1139 LS.IndVarStart = RRI.IndVarEnd;
1142 BasicBlock *LoopConstrainer::createPreheader(const LoopStructure &LS,
1146 BasicBlock *Preheader = BasicBlock::Create(Ctx, Tag, &F, LS.Header);
1147 BranchInst::Create(LS.Header, Preheader);
1149 for (Instruction &I : *LS.Header) {
1435 LoopStructure LS = MaybeLoopStructure.getValue();
1436 bool Increasing = LS.IndVarIncreasing;
1438 SE.getConstant(LS.IndVarNext->getType(), Increasing ? -1 : 1, true);
1440 cast<SCEVAddRecExpr>(SE.getAddExpr(SE.getSCEV(LS.IndVarNext), MinusOne));
1463 LoopConstrainer LC(*L, getAnalysis<LoopInfoWrapperPass>().getLoopInfo(), LS,