[llvm] 1cb7ec8 - [SimpleLoopUnswitch] Canonicalize variable names
Juneyoung Lee via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 22:33:17 PST 2020
Author: Juneyoung Lee
Date: 2020-02-26T15:33:02+09:00
New Revision: 1cb7ec870dc5c6b3900bfc832b910010dfac772b
URL: https://github.com/llvm/llvm-project/commit/1cb7ec870dc5c6b3900bfc832b910010dfac772b
DIFF: https://github.com/llvm/llvm-project/commit/1cb7ec870dc5c6b3900bfc832b910010dfac772b.diff
LOG: [SimpleLoopUnswitch] Canonicalize variable names
Added:
Modified:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index 4a82fd939dae..ef61403963c1 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -183,12 +183,12 @@ static void buildPartialUnswitchConditionalBranch(BasicBlock &BB,
bool Direction,
BasicBlock &UnswitchedSucc,
BasicBlock &NormalSucc,
- bool insertFreeze) {
+ bool InsertFreeze) {
IRBuilder<> IRB(&BB);
Value *Cond = Direction ? IRB.CreateOr(Invariants) :
IRB.CreateAnd(Invariants);
- if (insertFreeze)
+ if (InsertFreeze)
Cond = IRB.CreateFreeze(Cond, Cond->getName() + ".fr");
IRB.CreateCondBr(Cond, Direction ? &UnswitchedSucc : &NormalSucc,
Direction ? &NormalSucc : &UnswitchedSucc);
@@ -2016,7 +2016,7 @@ static void unswitchNontrivialInvariants(
ICFLoopSafetyInfo SafetyInfo(&DT);
SafetyInfo.computeLoopSafetyInfo(&L);
- bool insertFreeze = !SafetyInfo.isGuaranteedToExecute(TI, &DT, &L);
+ bool InsertFreeze = !SafetyInfo.isGuaranteedToExecute(TI, &DT, &L);
// If the edge from this terminator to a successor dominates that successor,
// store a map from each block in its dominator subtree to it. This lets us
@@ -2075,7 +2075,7 @@ static void unswitchNontrivialInvariants(
BasicBlock *ClonedPH = ClonedPHs.begin()->second;
BI->setSuccessor(ClonedSucc, ClonedPH);
BI->setSuccessor(1 - ClonedSucc, LoopPH);
- if (insertFreeze) {
+ if (InsertFreeze) {
auto Cond = BI->getCondition();
if (!isGuaranteedNotToBeUndefOrPoison(Cond))
BI->setCondition(new FreezeInst(Cond, Cond->getName() + ".fr", BI));
@@ -2095,7 +2095,7 @@ static void unswitchNontrivialInvariants(
else
Case.setSuccessor(ClonedPHs.find(Case.getCaseSuccessor())->second);
- if (insertFreeze) {
+ if (InsertFreeze) {
auto Cond = SI->getCondition();
if (!isGuaranteedNotToBeUndefOrPoison(Cond))
SI->setCondition(new FreezeInst(Cond, Cond->getName() + ".fr", SI));
@@ -2177,7 +2177,7 @@ static void unswitchNontrivialInvariants(
// When doing a partial unswitch, we have to do a bit more work to build up
// the branch in the split block.
buildPartialUnswitchConditionalBranch(*SplitBB, Invariants, Direction,
- *ClonedPH, *LoopPH, insertFreeze);
+ *ClonedPH, *LoopPH, InsertFreeze);
DTUpdates.push_back({DominatorTree::Insert, SplitBB, ClonedPH});
if (MSSAU) {
More information about the llvm-commits
mailing list