[llvm] [ProfCheck][NFC] Make Function argument from branch weight setter optional (PR #166032)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 07:54:44 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `amdgpu-offload-rhel-8-cmake-build-only` running on `rocm-docker-rhel-8` while building `llvm` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/27028

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[1440/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/LLVMContextImpl.cpp.o
[1441/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FEntryInserter.cpp.o
[1442/8173] Building CXX object lib/FuzzMutate/CMakeFiles/LLVMFuzzMutate.dir/RandomIRBuilder.cpp.o
[1443/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Value.cpp.o
[1444/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CallBrPrepare.cpp.o
[1445/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachineFunctionAnalysis.cpp.o
[1446/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GCMetadata.cpp.o
[1447/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GCMetadataPrinter.cpp.o
[1448/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CallingConvLower.cpp.o
[1449/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/CodeGen -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp: In member function ‘llvm::Value* {anonymous}::AtomicExpandImpl::insertRMWLLSCLoop(llvm::IRBuilderBase&, llvm::Type*, llvm::Value*, llvm::Align, llvm::AtomicOrdering, llvm::function_ref<llvm::Value*(llvm::IRBuilderBase&, llvm::Value*)>)’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp:1304:56: error: could not convert ‘* F’ from ‘llvm::Function’ to ‘llvm::StringRef’
   setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, *F, DEBUG_TYPE);
                                                        ^~
[1450/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ExpandReductions.cpp.o
[1451/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CommandFlags.cpp.o
[1452/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o
[1453/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/Analysis.cpp.o
[1454/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FuncletLayout.cpp.o
[1455/8173] Building CXX object lib/FuzzMutate/CMakeFiles/LLVMFuzzMutate.dir/IRMutator.cpp.o
[1456/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchFolding.cpp.o
[1457/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FaultMaps.cpp.o
[1458/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CriticalAntiDepBreaker.cpp.o
[1459/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/DwarfEHPrepare.cpp.o
[1460/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/DFAPacketizer.cpp.o
[1461/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ExpandVectorPredication.cpp.o
[1462/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FinalizeISel.cpp.o
[1463/8173] Building AMDGPUGenCallingConv.inc...
[1464/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Metadata.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/IR/Metadata.cpp:13:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DILocation]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:83:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
   template <class NodeTy> static void dispatchRecalculateHash(NodeTy *N) {
                                                               ~~~~~~~~^
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIExpression]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:84:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIGlobalVariableExpression]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:85:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DISubrange]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:88:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIEnumerator]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:89:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
Step 7 (build cmake config) failure: build cmake config (failure)
...
[1440/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/LLVMContextImpl.cpp.o
[1441/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FEntryInserter.cpp.o
[1442/8173] Building CXX object lib/FuzzMutate/CMakeFiles/LLVMFuzzMutate.dir/RandomIRBuilder.cpp.o
[1443/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Value.cpp.o
[1444/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CallBrPrepare.cpp.o
[1445/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachineFunctionAnalysis.cpp.o
[1446/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GCMetadata.cpp.o
[1447/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/GCMetadataPrinter.cpp.o
[1448/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CallingConvLower.cpp.o
[1449/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/CodeGen -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/include -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AtomicExpandPass.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp: In member function ‘llvm::Value* {anonymous}::AtomicExpandImpl::insertRMWLLSCLoop(llvm::IRBuilderBase&, llvm::Type*, llvm::Value*, llvm::Align, llvm::AtomicOrdering, llvm::function_ref<llvm::Value*(llvm::IRBuilderBase&, llvm::Value*)>)’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/CodeGen/AtomicExpandPass.cpp:1304:56: error: could not convert ‘* F’ from ‘llvm::Function’ to ‘llvm::StringRef’
   setExplicitlyUnknownBranchWeightsIfProfiled(*CondBr, *F, DEBUG_TYPE);
                                                        ^~
[1450/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ExpandReductions.cpp.o
[1451/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CommandFlags.cpp.o
[1452/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o
[1453/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/Analysis.cpp.o
[1454/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FuncletLayout.cpp.o
[1455/8173] Building CXX object lib/FuzzMutate/CMakeFiles/LLVMFuzzMutate.dir/IRMutator.cpp.o
[1456/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchFolding.cpp.o
[1457/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FaultMaps.cpp.o
[1458/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CriticalAntiDepBreaker.cpp.o
[1459/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/DwarfEHPrepare.cpp.o
[1460/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/DFAPacketizer.cpp.o
[1461/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ExpandVectorPredication.cpp.o
[1462/8173] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/FinalizeISel.cpp.o
[1463/8173] Building AMDGPUGenCallingConv.inc...
[1464/8173] Building CXX object lib/IR/CMakeFiles/LLVMCore.dir/Metadata.cpp.o
In file included from /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/lib/IR/Metadata.cpp:13:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DILocation]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:83:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
   template <class NodeTy> static void dispatchRecalculateHash(NodeTy *N) {
                                                               ~~~~~~~~^
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIExpression]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:84:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIGlobalVariableExpression]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:85:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DISubrange]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:88:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h: In instantiation of ‘static void llvm::MDNode::dispatchRecalculateHash(NodeTy*) [with NodeTy = llvm::DIEnumerator]’:
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.def:89:1:   required from here
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/llvm/include/llvm/IR/Metadata.h:1414:71: warning: parameter ‘N’ set but not used [-Wunused-but-set-parameter]

```

</details>

https://github.com/llvm/llvm-project/pull/166032


More information about the llvm-commits mailing list