Lines Matching refs:Guard
295 Value *expandCheck(SCEVExpander &Expander, Instruction *Guard,
301 Instruction *Guard);
305 Instruction *Guard);
309 Instruction *Guard);
312 SCEVExpander &Expander, Instruction *Guard);
314 bool widenWidenableBranchGuardConditions(BranchInst *Guard, SCEVExpander &Expander);
376 Instruction *Guard, in expandCheck() argument
383 IRBuilder<> Builder(Guard); in expandCheck()
392 Expander.expandCodeFor(LHS, Ty, findInsertPt(Expander, Guard, {LHS})); in expandCheck()
394 Expander.expandCodeFor(RHS, Ty, findInsertPt(Expander, Guard, {RHS})); in expandCheck()
395 IRBuilder<> Builder(findInsertPt(Guard, {LHSV, RHSV})); in expandCheck()
542 Instruction *Guard) { in widenICmpRangeCheckIncrementingLoop() argument
564 if (!Expander.isSafeToExpandAt(LatchStart, Guard) || in widenICmpRangeCheckIncrementingLoop()
565 !Expander.isSafeToExpandAt(LatchLimit, Guard)) { in widenICmpRangeCheckIncrementingLoop()
582 expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS); in widenICmpRangeCheckIncrementingLoop()
583 auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred, in widenICmpRangeCheckIncrementingLoop()
585 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck})); in widenICmpRangeCheckIncrementingLoop()
592 Instruction *Guard) { in widenICmpRangeCheckDecrementingLoop() argument
608 if (!Expander.isSafeToExpandAt(LatchStart, Guard) || in widenICmpRangeCheckDecrementingLoop()
609 !Expander.isSafeToExpandAt(LatchLimit, Guard)) { in widenICmpRangeCheckDecrementingLoop()
629 auto *FirstIterationCheck = expandCheck(Expander, Guard, in widenICmpRangeCheckDecrementingLoop()
632 auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, in widenICmpRangeCheckDecrementingLoop()
634 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck})); in widenICmpRangeCheckDecrementingLoop()
655 Instruction *Guard) { in widenICmpRangeCheck() argument
709 Expander, Guard); in widenICmpRangeCheck()
713 Expander, Guard); in widenICmpRangeCheck()
719 SCEVExpander &Expander, Instruction *Guard) { in widenChecks() argument
722 if (auto NewRangeCheck = widenICmpRangeCheck(ICI, Expander, Guard)) { in widenChecks()
728 bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard, in widenGuardConditions() argument
731 LLVM_DEBUG(Guard->dump()); in widenGuardConditions()
736 parseWidenableGuard(Guard, Checks); in widenGuardConditions()
737 widenChecks(Checks, WidenedChecks, Expander, Guard); in widenGuardConditions()
744 IRBuilder<> Builder(findInsertPt(Guard, Checks)); in widenGuardConditions()
746 auto *OldCond = Guard->getOperand(0); in widenGuardConditions()
747 Guard->setOperand(0, AllChecks); in widenGuardConditions()
749 Builder.SetInsertPoint(&*++BasicBlock::iterator(Guard)); in widenGuardConditions()
1239 for (auto *Guard : Guards) in runOnLoop() local
1240 Changed |= widenGuardConditions(Guard, Expander); in runOnLoop()
1241 for (auto *Guard : GuardsAsWidenableBranches) in runOnLoop() local
1242 Changed |= widenWidenableBranchGuardConditions(Guard, Expander); in runOnLoop()