Lines Matching refs:Guard
284 Value *expandCheck(SCEVExpander &Expander, Instruction *Guard,
289 Instruction *Guard);
293 Instruction *Guard);
297 Instruction *Guard);
299 SCEVExpander &Expander, Instruction *Guard);
301 bool widenWidenableBranchGuardConditions(BranchInst *Guard, SCEVExpander &Expander);
401 Instruction *Guard, in expandCheck() argument
408 IRBuilder<> Builder(Guard); in expandCheck()
416 Value *LHSV = Expander.expandCodeFor(LHS, Ty, findInsertPt(Guard, {LHS})); in expandCheck()
417 Value *RHSV = Expander.expandCodeFor(RHS, Ty, findInsertPt(Guard, {RHS})); in expandCheck()
418 IRBuilder<> Builder(findInsertPt(Guard, {LHSV, RHSV})); in expandCheck()
565 SCEVExpander &Expander, Instruction *Guard) { in widenICmpRangeCheckIncrementingLoop() argument
587 if (!isSafeToExpandAt(LatchStart, Guard, *SE) || in widenICmpRangeCheckIncrementingLoop()
588 !isSafeToExpandAt(LatchLimit, Guard, *SE)) { in widenICmpRangeCheckIncrementingLoop()
605 expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS); in widenICmpRangeCheckIncrementingLoop()
606 auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred, in widenICmpRangeCheckIncrementingLoop()
608 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck})); in widenICmpRangeCheckIncrementingLoop()
614 SCEVExpander &Expander, Instruction *Guard) { in widenICmpRangeCheckDecrementingLoop() argument
630 if (!isSafeToExpandAt(LatchStart, Guard, *SE) || in widenICmpRangeCheckDecrementingLoop()
631 !isSafeToExpandAt(LatchLimit, Guard, *SE)) { in widenICmpRangeCheckDecrementingLoop()
651 auto *FirstIterationCheck = expandCheck(Expander, Guard, in widenICmpRangeCheckDecrementingLoop()
654 auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, in widenICmpRangeCheckDecrementingLoop()
656 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck})); in widenICmpRangeCheckDecrementingLoop()
677 Instruction *Guard) { in widenICmpRangeCheck() argument
731 Expander, Guard); in widenICmpRangeCheck()
735 Expander, Guard); in widenICmpRangeCheck()
742 Instruction *Guard) { in collectChecks() argument
774 Guard)) { in collectChecks()
793 bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard, in widenGuardConditions() argument
796 LLVM_DEBUG(Guard->dump()); in widenGuardConditions()
800 unsigned NumWidened = collectChecks(Checks, Guard->getOperand(0), Expander, in widenGuardConditions()
801 Guard); in widenGuardConditions()
808 IRBuilder<> Builder(findInsertPt(Guard, Checks)); in widenGuardConditions()
810 auto *OldCond = Guard->getOperand(0); in widenGuardConditions()
811 Guard->setOperand(0, AllChecks); in widenGuardConditions()
1240 for (auto *Guard : Guards) in runOnLoop() local
1241 Changed |= widenGuardConditions(Guard, Expander); in runOnLoop()
1242 for (auto *Guard : GuardsAsWidenableBranches) in runOnLoop() local
1243 Changed |= widenWidenableBranchGuardConditions(Guard, Expander); in runOnLoop()