[llvm] [SimplifyCFG][PGO] Reuse existing `setBranchWeights` (PR #160629)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 10:22:22 PDT 2025
================
@@ -103,8 +103,9 @@ bool ProfileInjector::inject() {
if (AnnotateSelect) {
for (auto &I : BB) {
if (isa<SelectInst>(I) && !I.getMetadata(LLVMContext::MD_prof))
- setBranchWeights(I, {SelectTrueWeight, SelectFalseWeight},
- /*IsExpected=*/false);
+ setBranchWeights(
+ I, ArrayRef<uint32_t>{SelectTrueWeight, SelectFalseWeight},
----------------
MatzeB wrote:
unnecessary cast?
https://github.com/llvm/llvm-project/pull/160629
More information about the llvm-commits
mailing list