aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/LoopPredication.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-04-01 22:39:54 +0000
committerPhilip Reames <listmail@philipreames.com>2019-04-01 22:39:54 +0000
commitf608678f1f303e92cacf75c4da3b6e040b328956 (patch)
tree3dbc51d7ccb69c897c9032493d180a110bdb89da /llvm/lib/Transforms/Scalar/LoopPredication.cpp
parente44c20a68d2659e2a3dae8aa8f8c61c36145b1f7 (diff)
downloadllvm-f608678f1f303e92cacf75c4da3b6e040b328956.zip
llvm-f608678f1f303e92cacf75c4da3b6e040b328956.tar.gz
llvm-f608678f1f303e92cacf75c4da3b6e040b328956.tar.bz2
[LoopPred] Rename a variable to simply a future patch [NFC]
llvm-svn: 357433
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopPredication.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopPredication.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp
index ccecc80..2b031ba 100644
--- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp
+++ b/llvm/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<Value *, 4> Checks;
IRBuilder<> Builder(cast<Instruction>(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);