[llvm] [ProfCheck][NFC] fix argument order for call to setExplicitlyUnknownBranchWeightsIfProfiled (PR #166601)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 10:06:18 PST 2025
https://github.com/tgymnich updated https://github.com/llvm/llvm-project/pull/166601
>From 61e23d0ec945fddb093ad56052926cb2e1e1aabb Mon Sep 17 00:00:00 2001
From: Tim Gymnich <tim at gymni.ch>
Date: Wed, 5 Nov 2025 17:54:05 +0000
Subject: [PATCH 1/2] [ProfCheck][NFC] fix argument order for call to
setExplicitlyUnknownBranchWeightsIfProfiled
---
llvm/lib/CodeGen/AtomicExpandPass.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index bd62b1646c761..37c41fc907d97 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -1691,7 +1691,7 @@ Value *AtomicExpandImpl::insertRMWCmpXchgLoop(
// Atomic RMW expands to a cmpxchg loop, Since precise branch weights
// cannot be easily determined here, we mark the branch as "unknown" (50/50)
// to prevent misleading optimizations.
- setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, *F, DEBUG_TYPE);
+ setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, DEBUG_TYPE, F);
Builder.SetInsertPoint(ExitBB, ExitBB->begin());
return NewLoaded;
>From 4257c57dc3699a92e616e1338731438213288280 Mon Sep 17 00:00:00 2001
From: Tim Gymnich <tim at gymni.ch>
Date: Wed, 5 Nov 2025 18:06:06 +0000
Subject: [PATCH 2/2] drop function argument
---
llvm/lib/CodeGen/AtomicExpandPass.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index 37c41fc907d97..d9bc042d6807e 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -1691,7 +1691,7 @@ Value *AtomicExpandImpl::insertRMWCmpXchgLoop(
// Atomic RMW expands to a cmpxchg loop, Since precise branch weights
// cannot be easily determined here, we mark the branch as "unknown" (50/50)
// to prevent misleading optimizations.
- setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, DEBUG_TYPE, F);
+ setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, DEBUG_TYPE);
Builder.SetInsertPoint(ExitBB, ExitBB->begin());
return NewLoaded;
More information about the llvm-commits
mailing list