File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1293,9 +1293,17 @@ static bool isReachable(SILBasicBlock *Block) {
1293
1293
}
1294
1294
#endif
1295
1295
1296
+ static llvm::cl::opt<bool > SimplifyUnconditionalBranches (
1297
+ " simplify-cfg-simplify-unconditional-branches" , llvm::cl::init(true ));
1298
+
1296
1299
// / simplifyBranchBlock - Simplify a basic block that ends with an unconditional
1297
1300
// / branch.
1298
1301
bool SimplifyCFG::simplifyBranchBlock (BranchInst *BI) {
1302
+ // If we are asked to not simplify unconditional branches (for testing
1303
+ // purposes), exit early.
1304
+ if (!SimplifyUnconditionalBranches)
1305
+ return false ;
1306
+
1299
1307
// First simplify instructions generating branch operands since that
1300
1308
// can expose CFG simplifications.
1301
1309
bool Simplified = simplifyBranchOperands (BI->getArgs ());
You can’t perform that action at this time.
0 commit comments