Skip to content

Commit 962bd8c

Browse files
committed
[Fuzzer] Adopt createUnlikelyBranchWeights in CreateGateBranch
Adopt the extracted branch weights method added here: llvm#89464
1 parent fdb050a commit 962bd8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ Instruction *ModuleSanitizerCoverage::CreateGateBranch(Function &F,
831831
// Set the branch weights in order to minimize the price paid when the
832832
// gate is turned off, allowing the default enablement of this
833833
// instrumentation with as little of a performance cost as possible
834-
auto Weights = MDBuilder(*C).createBranchWeights(1, 100000);
834+
auto Weights = MDBuilder(*C).createUnlikelyBranchWeights();
835835
return SplitBlockAndInsertIfThen(FunctionGateCmp, IP, false, Weights);
836836
}
837837

0 commit comments

Comments
 (0)