From: Philip Reames Date: Mon, 1 Apr 2019 22:39:54 +0000 (+0000) Subject: [LoopPred] Rename a variable to simply a future patch [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4513bbfe099b721abd98cbf6c31ba63bc6716219;p=llvm [LoopPred] Rename a variable to simply a future patch [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357433 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopPredication.cpp b/lib/Transforms/Scalar/LoopPredication.cpp index ccecc80746e..2b031ba4184 100644 --- a/lib/Transforms/Scalar/LoopPredication.cpp +++ b/lib/Transforms/Scalar/LoopPredication.cpp @@ -654,17 +654,17 @@ bool LoopPredication::widenGuardConditions(IntrinsicInst *Guard, } bool LoopPredication::widenWidenableBranchGuardConditions( - BranchInst *Guard, SCEVExpander &Expander) { - assert(isGuardAsWidenableBranch(Guard) && "Must be!"); + BranchInst *BI, SCEVExpander &Expander) { + assert(isGuardAsWidenableBranch(BI) && "Must be!"); LLVM_DEBUG(dbgs() << "Processing guard:\n"); - LLVM_DEBUG(Guard->dump()); + LLVM_DEBUG(BI->dump()); TotalConsidered++; SmallVector Checks; IRBuilder<> Builder(cast(Preheader->getTerminator())); Value *Condition = nullptr, *WidenableCondition = nullptr; BasicBlock *GBB = nullptr, *DBB = nullptr; - parseWidenableBranch(Guard, Condition, WidenableCondition, GBB, DBB); + parseWidenableBranch(BI, Condition, WidenableCondition, GBB, DBB); unsigned NumWidened = collectChecks(Checks, Condition, Expander, Builder); if (NumWidened == 0) return false; @@ -672,7 +672,7 @@ bool LoopPredication::widenWidenableBranchGuardConditions( TotalWidened += NumWidened; // Emit the new guard condition - Builder.SetInsertPoint(Guard); + Builder.SetInsertPoint(BI); Value *LastCheck = nullptr; for (auto *Check : Checks) if (!LastCheck) @@ -682,9 +682,9 @@ bool LoopPredication::widenWidenableBranchGuardConditions( // Make sure that the check contains widenable condition and therefore can be // further widened. LastCheck = Builder.CreateAnd(LastCheck, WidenableCondition); - auto *OldCond = Guard->getOperand(0); - Guard->setOperand(0, LastCheck); - assert(isGuardAsWidenableBranch(Guard) && + auto *OldCond = BI->getOperand(0); + BI->setOperand(0, LastCheck); + assert(isGuardAsWidenableBranch(BI) && "Stopped being a guard after transform?"); RecursivelyDeleteTriviallyDeadInstructions(OldCond);