[llvm] [MergeFunctions] Preserve entry counts on folds (PR #202218)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 22:21:50 PDT 2026


llvm-ci wrote:

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

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
  119 | # define _GLIBCXX17_DEPRECATED [[__deprecated__]]
      |                                  ^
1 warning generated.
195.519 [2568/64/1487] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/AlwaysInliner.cpp.o
195.580 [2567/64/1488] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/ExpandVariadics.cpp.o
195.758 [2566/64/1489] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopFlatten.cpp.o
196.011 [2565/64/1490] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/StripDeadPrototypes.cpp.o
196.036 [2564/64/1491] Building CXX object lib/CodeGen/SelectionDAG/CMakeFiles/LLVMSelectionDAG.dir/SelectionDAGBuilder.cpp.o
196.403 [2563/64/1492] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/LoopExtractor.cpp.o
196.732 [2562/64/1493] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o
FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o 
ccache /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/ml-opt-dev-x86-64-b1/build/lib/Transforms/IPO -I/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO -I/b/ml-opt-dev-x86-64-b1/build/include -I/b/ml-opt-dev-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 -Xclang -fno-pch-timestamp -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -DEIGEN_NEON_GEBP_NR=4 -DTFL_STATIC_LIBRARY_BUILD -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /b/ml-opt-dev-x86-64-b1/build/lib/IR/CMakeFiles/LLVMCore.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /b/ml-opt-dev-x86-64-b1/build/lib/IR/CMakeFiles/LLVMCore.dir/cmake_pch.hxx -MD -MT lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o -MF lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o.d -o lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o -c /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:737:27: error: no member named 'ProfileCount' in 'llvm::Function'
  737 |   std::optional<Function::ProfileCount> GEC = G->getEntryCount();
      |                           ^~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:883:58: error: no member named 'ProfileCount' in 'llvm::Function'
  883 |                                  std::optional<Function::ProfileCount> FC,
      |                                                          ^~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:884:58: error: no member named 'ProfileCount' in 'llvm::Function'
  884 |                                  std::optional<Function::ProfileCount> GC) {
      |                                                          ^~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:895:27: error: no member named 'ProfileCount' in 'llvm::Function'
  895 |   std::optional<Function::ProfileCount> FEC = F->getEntryCount();
      |                           ^~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:896:27: error: no member named 'ProfileCount' in 'llvm::Function'
  896 |   std::optional<Function::ProfileCount> GEC = G->getEntryCount();
      |                           ^~~~~~~~~~~~
In file included from <built-in>:1:
In file included from /b/ml-opt-dev-x86-64-b1/build/lib/IR/CMakeFiles/LLVMCore.dir/cmake_pch.hxx:5:
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/IR/pch.h:13:
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/IR/BasicBlock.h:17:
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/ADT/DenseMap.h:27:
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/ADT/STLExtras.h:21:
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/ADT/STLForwardCompat.h:21:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/functional:64:
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<std::pair<unsigned long, llvm::Function *>>' 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:4996:15: note: in instantiation of member function 'std::_Temporary_buffer<__gnu_cxx::__normal_iterator<std::pair<unsigned long, llvm::Function *> *, std::vector<std::pair<unsigned long, llvm::Function *>>>, std::pair<unsigned long, llvm::Function *>>::_Temporary_buffer' requested here
 4996 |       _TmpBuf __buf(__first, (__last - __first + 1) / 2);
      |               ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:5070:23: note: in instantiation of function template specialization 'std::__stable_sort<__gnu_cxx::__normal_iterator<std::pair<unsigned long, llvm::Function *> *, std::vector<std::pair<unsigned long, llvm::Function *>>>, __gnu_cxx::__ops::_Iter_comp_iter<llvm::less_first>>' requested here
 5070 |       _GLIBCXX_STD_A::__stable_sort(__first, __last,
      |                       ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/ADT/STLExtras.h:2122:8: note: in instantiation of function template specialization 'std::stable_sort<__gnu_cxx::__normal_iterator<std::pair<unsigned long, llvm::Function *> *, std::vector<std::pair<unsigned long, llvm::Function *>>>, llvm::less_first>' requested here
 2122 |   std::stable_sort(adl_begin(Range), adl_end(Range), C);
      |        ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:453:9: note: in instantiation of function template specialization 'llvm::stable_sort<std::vector<std::pair<unsigned long, llvm::Function *>> &, llvm::less_first>' requested here

```

</details>

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


More information about the llvm-commits mailing list