Lines Matching refs:Guard

1 //===-- LoopPredication.cpp - Guard based loop predication pass -----------===//
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,
383 IRBuilder<> Builder(Guard);
392 Expander.expandCodeFor(LHS, Ty, findInsertPt(Expander, Guard, {LHS}));
394 Expander.expandCodeFor(RHS, Ty, findInsertPt(Expander, Guard, {RHS}));
395 IRBuilder<> Builder(findInsertPt(Guard, {LHSV, RHSV}));
542 Instruction *Guard) {
564 if (!Expander.isSafeToExpandAt(LatchStart, Guard) ||
565 !Expander.isSafeToExpandAt(LatchLimit, Guard)) {
582 expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS);
583 auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred,
585 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
592 Instruction *Guard) {
608 if (!Expander.isSafeToExpandAt(LatchStart, Guard) ||
609 !Expander.isSafeToExpandAt(LatchLimit, Guard)) {
629 auto *FirstIterationCheck = expandCheck(Expander, Guard,
632 auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit,
634 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
655 Instruction *Guard) {
668 LLVM_DEBUG(dbgs() << "Guard check:\n");
709 Expander, Guard);
713 Expander, Guard);
719 SCEVExpander &Expander, Instruction *Guard) {
722 if (auto NewRangeCheck = widenICmpRangeCheck(ICI, Expander, Guard)) {
728 bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard,
731 LLVM_DEBUG(Guard->dump());
736 parseWidenableGuard(Guard, Checks);
737 widenChecks(Checks, WidenedChecks, Expander, Guard);
744 IRBuilder<> Builder(findInsertPt(Guard, Checks));
746 auto *OldCond = Guard->getOperand(0);
747 Guard->setOperand(0, AllChecks);
749 Builder.SetInsertPoint(&*++BasicBlock::iterator(Guard));
1239 for (auto *Guard : Guards)
1240 Changed |= widenGuardConditions(Guard, Expander);
1241 for (auto *Guard : GuardsAsWidenableBranches)
1242 Changed |= widenWidenableBranchGuardConditions(Guard, Expander);