Lines Matching refs:Guard

1 //===-- LoopPredication.cpp - Guard based loop predication pass -----------===//
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);
400 Instruction *Guard,
407 IRBuilder<> Builder(Guard);
415 Value *LHSV = Expander.expandCodeFor(LHS, Ty, findInsertPt(Guard, {LHS}));
416 Value *RHSV = Expander.expandCodeFor(RHS, Ty, findInsertPt(Guard, {RHS}));
417 IRBuilder<> Builder(findInsertPt(Guard, {LHSV, RHSV}));
563 SCEVExpander &Expander, Instruction *Guard) {
585 if (!isSafeToExpandAt(LatchStart, Guard, *SE) ||
586 !isSafeToExpandAt(LatchLimit, Guard, *SE)) {
603 expandCheck(Expander, Guard, LimitCheckPred, LatchLimit, RHS);
604 auto *FirstIterationCheck = expandCheck(Expander, Guard, RangeCheck.Pred,
606 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
612 SCEVExpander &Expander, Instruction *Guard) {
628 if (!isSafeToExpandAt(LatchStart, Guard, *SE) ||
629 !isSafeToExpandAt(LatchLimit, Guard, *SE)) {
649 auto *FirstIterationCheck = expandCheck(Expander, Guard,
652 auto *LimitCheck = expandCheck(Expander, Guard, LimitCheckPred, LatchLimit,
654 IRBuilder<> Builder(findInsertPt(Guard, {FirstIterationCheck, LimitCheck}));
675 Instruction *Guard) {
688 LLVM_DEBUG(dbgs() << "Guard check:\n");
729 Expander, Guard);
733 Expander, Guard);
740 Instruction *Guard) {
772 Guard)) {
791 bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard,
794 LLVM_DEBUG(Guard->dump());
798 unsigned NumWidened = collectChecks(Checks, Guard->getOperand(0), Expander,
799 Guard);
806 IRBuilder<> Builder(findInsertPt(Guard, Checks));
808 auto *OldCond = Guard->getOperand(0);
809 Guard->setOperand(0, AllChecks);
1246 for (auto *Guard : Guards)
1247 Changed |= widenGuardConditions(Guard, Expander);
1248 for (auto *Guard : GuardsAsWidenableBranches)
1249 Changed |= widenWidenableBranchGuardConditions(Guard, Expander);