Lines Matching defs:Guard

1 //===-- LoopPredication.cpp - Guard based loop predication pass -----------===//
294 Value *expandCheck(SCEVExpander &Expander, Instruction *Guard,
300 Instruction *Guard);
304 Instruction *Guard);
308 Instruction *Guard);
311 SCEVExpander &Expander, Instruction *Guard);
313 bool widenWidenableBranchGuardConditions(BranchInst *Guard, SCEVExpander &Expander);
375 Instruction *Guard,
382 IRBuilder<> Builder(Guard);
391 Expander.expandCodeFor(LHS, Ty, findInsertPt(Expander, Guard, {LHS}));
393 Expander.expandCodeFor(RHS, Ty, findInsertPt(Expander, Guard, {RHS}));
394 IRBuilder<> Builder(findInsertPt(Guard, {LHSV, RHSV}));
541 Instruction *Guard) {
563 if (!Expander.isSafeToExpandAt(LatchStart, Guard) ||
564 !Expander.isSafeToExpandAt(LatchLimit, Guard)) {
581 expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS);
582 auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred,
584 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
591 Instruction *Guard) {
607 if (!Expander.isSafeToExpandAt(LatchStart, Guard) ||
608 !Expander.isSafeToExpandAt(LatchLimit, Guard)) {
628 auto *FirstIterationCheck = expandCheck(Expander, Guard,
631 auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit,
633 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
654 Instruction *Guard) {
667 LLVM_DEBUG(dbgs() << "Guard check:\n");
708 Expander, Guard);
712 Expander, Guard);
718 SCEVExpander &Expander, Instruction *Guard) {
721 if (auto NewRangeCheck = widenICmpRangeCheck(ICI, Expander, Guard)) {
727 bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard,
730 LLVM_DEBUG(Guard->dump());
735 parseWidenableGuard(Guard, Checks);
736 widenChecks(Checks, WidenedChecks, Expander, Guard);
743 IRBuilder<> Builder(findInsertPt(Guard, Checks));
745 auto *OldCond = Guard->getOperand(0);
746 Guard->setOperand(0, AllChecks);
748 Builder.SetInsertPoint(&*++BasicBlock::iterator(Guard));
1238 for (auto *Guard : Guards)
1239 Changed |= widenGuardConditions(Guard, Expander);
1240 for (auto *Guard : GuardsAsWidenableBranches)
1241 Changed |= widenWidenableBranchGuardConditions(Guard, Expander);