Skip to content

Commit b20f2dc

Browse files
committed
[MachineSink] Lower SplitEdgeProbabilityThreshold
Lower it slightly below the likeliness of a null-check to be true which is set to 37.5% (see PtrUntakenProb). Otherwise, it will split the edge and create another basic-block and with an unconditional branch which might make the CFG more complex and with a suboptimal block placement. Note that if multiple instructions can be sinked from the same edge then a split will occur regardless of this change.
1 parent 2cb5241 commit b20f2dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/MachineSink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static cl::opt<unsigned> SplitEdgeProbabilityThreshold(
8282
"If the branch threshold is higher than this threshold, we allow "
8383
"speculative execution of up to 1 instruction to avoid branching to "
8484
"splitted critical edge"),
85-
cl::init(40), cl::Hidden);
85+
cl::init(35), cl::Hidden);
8686

8787
static cl::opt<unsigned> SinkLoadInstsPerBlockThreshold(
8888
"machine-sink-load-instrs-threshold",

0 commit comments

Comments
 (0)