• Home
  • Raw
  • Download

Lines Matching refs:LS

541   changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
548 BasicBlock *createPreheader(const LoopStructure &LS, BasicBlock *OldPreheader,
556 LoopStructure &LS, BasicBlock *ContinuationBlockAndPreheader,
588 LoopConstrainer(Loop &L, LoopInfo &LI, const LoopStructure &LS, in LoopConstrainer() argument
593 MainLoopStructure(LS) {} in LoopConstrainer()
946 const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt, in changeIterationSpaceEnd() argument
1023 auto BBInsertLocation = std::next(Function::iterator(LS.Latch)); in changeIterationSpaceEnd()
1024 RRI.ExitSelector = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".exit.selector", in changeIterationSpaceEnd()
1026 RRI.PseudoExit = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".pseudo.exit", &F, in changeIterationSpaceEnd()
1030 bool Increasing = LS.IndVarIncreasing; in changeIterationSpaceEnd()
1036 ? B.CreateICmpSLT(LS.IndVarStart, ExitSubloopAt) in changeIterationSpaceEnd()
1037 : B.CreateICmpSGT(LS.IndVarStart, ExitSubloopAt); in changeIterationSpaceEnd()
1039 B.CreateCondBr(EnterLoopCond, LS.Header, RRI.PseudoExit); in changeIterationSpaceEnd()
1042 LS.LatchBr->setSuccessor(LS.LatchBrExitIdx, RRI.ExitSelector); in changeIterationSpaceEnd()
1043 B.SetInsertPoint(LS.LatchBr); in changeIterationSpaceEnd()
1045 Increasing ? B.CreateICmpSLT(LS.IndVarNext, ExitSubloopAt) in changeIterationSpaceEnd()
1046 : B.CreateICmpSGT(LS.IndVarNext, ExitSubloopAt); in changeIterationSpaceEnd()
1047 Value *CondForBranch = LS.LatchBrExitIdx == 1 in changeIterationSpaceEnd()
1051 LS.LatchBr->setCondition(CondForBranch); in changeIterationSpaceEnd()
1059 ? B.CreateICmpSLT(LS.IndVarNext, LS.LoopExitAt) in changeIterationSpaceEnd()
1060 : B.CreateICmpSGT(LS.IndVarNext, LS.LoopExitAt); in changeIterationSpaceEnd()
1061 B.CreateCondBr(IterationsLeft, RRI.PseudoExit, LS.LatchExit); in changeIterationSpaceEnd()
1069 for (Instruction &I : *LS.Header) { in changeIterationSpaceEnd()
1079 NewPHI->addIncoming(PN->getIncomingValueForBlock(LS.Latch), in changeIterationSpaceEnd()
1084 RRI.IndVarEnd = PHINode::Create(LS.IndVarNext->getType(), 2, "indvar.end", in changeIterationSpaceEnd()
1086 RRI.IndVarEnd->addIncoming(LS.IndVarStart, Preheader); in changeIterationSpaceEnd()
1087 RRI.IndVarEnd->addIncoming(LS.IndVarNext, RRI.ExitSelector); in changeIterationSpaceEnd()
1091 for (Instruction &I : *LS.LatchExit) { in changeIterationSpaceEnd()
1093 replacePHIBlock(PN, LS.Latch, RRI.ExitSelector); in changeIterationSpaceEnd()
1102 LoopStructure &LS, BasicBlock *ContinuationBlock, in rewriteIncomingValuesForPHIs() argument
1106 for (Instruction &I : *LS.Header) { in rewriteIncomingValuesForPHIs()
1117 LS.IndVarStart = RRI.IndVarEnd; in rewriteIncomingValuesForPHIs()
1120 BasicBlock *LoopConstrainer::createPreheader(const LoopStructure &LS, in createPreheader() argument
1124 BasicBlock *Preheader = BasicBlock::Create(Ctx, Tag, &F, LS.Header); in createPreheader()
1125 BranchInst::Create(LS.Header, Preheader); in createPreheader()
1127 for (Instruction &I : *LS.Header) { in createPreheader()
1414 LoopStructure LS = MaybeLoopStructure.getValue(); in runOnLoop() local
1415 bool Increasing = LS.IndVarIncreasing; in runOnLoop()
1417 SE.getConstant(LS.IndVarNext->getType(), Increasing ? -1 : 1, true); in runOnLoop()
1419 cast<SCEVAddRecExpr>(SE.getAddExpr(SE.getSCEV(LS.IndVarNext), MinusOne)); in runOnLoop()
1442 LoopConstrainer LC(*L, getAnalysis<LoopInfoWrapperPass>().getLoopInfo(), LS, in runOnLoop()