File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ llvm::cl::opt<bool> EnableOSSARewriteTerminator(
57
57
" Enable OSSA simplify-cfg with non-trivial terminator rewriting "
58
58
" (staging)." ));
59
59
60
+ llvm::cl::opt<bool > IsInfiniteJumpThreadingBudget (
61
+ " sil-infinite-jump-threading-budget" ,
62
+ llvm::cl::desc (
63
+ " Use infinite budget for jump threading. Useful for testing purposes" ));
64
+
60
65
STATISTIC (NumBlocksDeleted, " Number of unreachable blocks removed" );
61
66
STATISTIC (NumBlocksMerged, " Number of blocks merged together" );
62
67
STATISTIC (NumJumpThreads, " Number of jumps threaded" );
@@ -1068,7 +1073,7 @@ bool SimplifyCFG::tryJumpThreading(BranchInst *BI) {
1068
1073
// major second order simplifications. Here we only do it if there are
1069
1074
// "constant" arguments to the branch or if we know how to fold something
1070
1075
// given the duplication.
1071
- int ThreadingBudget = 0 ;
1076
+ int ThreadingBudget = IsInfiniteJumpThreadingBudget ? INT_MAX : 0 ;
1072
1077
1073
1078
for (unsigned i : indices (BI->getArgs ())) {
1074
1079
SILValue Arg = BI->getArg (i);
You can’t perform that action at this time.
0 commit comments