[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:49:49 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ml-opt-devrel-x86-64` running on `ml-opt-devrel-x86-64-b2` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
218.294 [1725/64/2202] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/Vectorize.cpp.o
219.574 [1724/64/2203] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/LoopExtractor.cpp.o
219.887 [1723/64/2204] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/ScalarizeMaskedMemIntrin.cpp.o
220.460 [1722/64/2205] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/StraightLineStrengthReduce.cpp.o
220.931 [1721/64/2206] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SeparateConstOffsetFromGEP.cpp.o
221.068 [1720/64/2207] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LICM.cpp.o
221.494 [1719/64/2208] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopUnrollPass.cpp.o
223.012 [1718/64/2209] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ExpandVariadics.cpp.o
223.506 [1717/64/2210] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/TailRecursionElimination.cpp.o
224.303 [1716/64/2211] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o
FAILED: lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o 
ccache /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -DGTEST_HAS_RTTI=0 -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/b/ml-opt-devrel-x86-64-b1/build/lib/Transforms/Scalar -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar -I/var/lib/buildbot/.local/lib/python3.7/site-packages/tensorflow/include -I/b/ml-opt-devrel-x86-64-b1/build/include -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include -isystem /tmp/tflitebuild/tensorflow/include -isystem /tmp/tflitebuild/eigen/include/eigen3 -isystem /tmp/tflitebuild/abseil-cpp/include -isystem /tmp/tflitebuild/flatbuffers/include -isystem /tmp/tflitebuild/gemmlowp/include/gemmlowp -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes/ml_dtypes -isystem /tmp/tflitebuild/ruy/include -isystem /tmp/tflitebuild/cpuinfo/include -isystem /tmp/tflitebuild/ARM_NEON_2_x86_SSE/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -DEIGEN_NEON_GEBP_NR=4 -DTFL_STATIC_LIBRARY_BUILD -std=c++17 -MD -MT lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o -MF lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o.d -o lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o -c /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:391:5: error: no matching function for call to 'setExplicitlyUnknownBranchWeightsIfProfiled'
  391 |     setExplicitlyUnknownBranchWeightsIfProfiled(*BR, *BR->getFunction(),
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/IR/ProfDataUtils.h:200:1: note: candidate function not viable: no known conversion from 'Function' to 'StringRef' for 2nd argument
  200 | setExplicitlyUnknownBranchWeightsIfProfiled(Instruction &I, StringRef PassName,
      | ^                                                           ~~~~~~~~~~~~~~~~~~
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:3206:3: error: no matching function for call to 'setExplicitlyUnknownBranchWeightsIfProfiled'
 3206 |   setExplicitlyUnknownBranchWeightsIfProfiled(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/IR/ProfDataUtils.h:200:1: note: candidate function not viable: no known conversion from 'Function' to 'StringRef' for 2nd argument
  200 | setExplicitlyUnknownBranchWeightsIfProfiled(Instruction &I, StringRef PassName,
      | ^                                                           ~~~~~~~~~~~~~~~~~~
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:9:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/Transforms/Scalar/SimpleLoopUnswitch.h:13:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/Analysis/LoopAnalysisManager.h:32:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/IR/PassManager.h:40:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/ADT/DenseMap.h:20:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/ADT/STLExtras.h:21:
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/ADT/Hashing.h:53:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/algorithm:61:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:61:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: warning: 'get_temporary_buffer<llvm::BasicBlock *>' is deprecated [-Wdeprecated-declarations]
  263 |                 std::get_temporary_buffer<value_type>(_M_original_len));
      |                      ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:1580:2: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<llvm::BasicBlock **, std::vector<llvm::BasicBlock *>>, llvm::BasicBlock *>::_Temporary_buffer' requested here
 1580 |         __buf(__first, std::distance(__first, __last));
      |         ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:1617:19: note: in instantiation of function template specialization 'std::__stable_partition<__gnu_cxx::__normal_iterator<llvm::BasicBlock **, std::vector<llvm::BasicBlock *>>, __gnu_cxx::__ops::_Iter_pred<(lambda at /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2022:17)>>' requested here
 1617 |       return std::__stable_partition(__first, __last,
      |                   ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2020:18: note: in instantiation of function template specialization 'std::stable_partition<__gnu_cxx::__normal_iterator<llvm::BasicBlock **, std::vector<llvm::BasicBlock *>>, (lambda at /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2022:17)>' requested here
 2020 |           : std::stable_partition(
      |                  ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:99:5: note: 'get_temporary_buffer<llvm::BasicBlock *>' has been explicitly marked deprecated here
   99 |     _GLIBCXX17_DEPRECATED
      |     ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/x86_64-linux-gnu/c++/12/bits/c++config.h:119:34: note: expanded from macro '_GLIBCXX17_DEPRECATED'

```

</details>

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


More information about the llvm-commits mailing list