aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 62f0791..6cdd18f 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -3267,7 +3267,7 @@ FoldCondBranchOnValueKnownInPredecessorImpl(BranchInst *BI, DomTreeUpdater *DTU,
MergeBlockIntoPredecessor(EdgeBB, DTU);
// Signal repeat, simplifying any other constants.
- return None;
+ return std::nullopt;
}
return false;
@@ -3282,8 +3282,8 @@ static bool FoldCondBranchOnValueKnownInPredecessor(BranchInst *BI,
do {
// Note that None means "we changed things, but recurse further."
Result = FoldCondBranchOnValueKnownInPredecessorImpl(BI, DTU, DL, AC);
- EverChanged |= Result == None || *Result;
- } while (Result == None);
+ EverChanged |= Result == std::nullopt || *Result;
+ } while (Result == std::nullopt);
return EverChanged;
}
@@ -3558,7 +3558,7 @@ shouldFoldCondBranchesToCommonDestination(BranchInst *BI, BranchInst *PBI,
if (PBITrueProb.isUnknown() || PBITrueProb.getCompl() < Likely)
return {{Instruction::Or, true}};
}
- return None;
+ return std::nullopt;
}
static bool performBranchToCommonDestFolding(BranchInst *BI, BranchInst *PBI,