[llvm] [MergeFunctions] Preserve entry counts on folds (PR #202218)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 23:49:57 PDT 2026
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `llvm` at step 5 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/57754
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (build-unified-tree) failure: build (failure)
...
3.225 [45/32/70] Linking CXX executable bin/llvm-cfi-verify
3.249 [45/31/71] Linking CXX executable bin/clang-offload-bundler
3.306 [45/30/72] Building CXX object tools/lld/Common/CMakeFiles/lldCommon.dir/Version.cpp.o
3.332 [44/30/73] Linking CXX static library lib/liblldCommon.a
3.364 [44/29/74] Linking CXX executable bin/yaml2obj
3.408 [44/28/75] Linking CXX executable bin/verify-uselistorder
3.455 [44/27/76] Linking CXX executable bin/sancov
3.464 [44/26/77] Linking CXX executable bin/sanstats
3.759 [44/25/78] Linking CXX executable bin/clang-ssaf-linker
3.801 [44/24/79] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o
FAILED: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/MergeFunctions.cpp.o
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/g++ -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/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/Transforms/IPO -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/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-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -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 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In member function ‘void {anonymous}::MergeFunctions::writeThunk(llvm::Function*, llvm::Function*)’:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:737:27: error: ‘ProfileCount’ is not a member of ‘llvm::Function’
737 | std::optional<Function::ProfileCount> GEC = G->getEntryCount();
| ^~~~~~~~~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:737:39: error: template argument 1 is invalid
737 | std::optional<Function::ProfileCount> GEC = G->getEntryCount();
| ^
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:737:63: error: cannot convert ‘std::optional<long unsigned int>’ to ‘int’ in initialization
737 | std::optional<Function::ProfileCount> GEC = G->getEntryCount();
| ~~~~~~~~~~~~~~~~^~
| |
| std::optional<long unsigned int>
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:808:27: error: invalid type argument of unary ‘*’ (have ‘int’)
808 | NewG->setEntryCount(*GEC);
| ^~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: At global scope:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:883:58: error: ‘ProfileCount’ is not a member of ‘llvm::Function’
883 | std::optional<Function::ProfileCount> FC,
| ^~~~~~~~~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:883:70: error: template argument 1 is invalid
883 | std::optional<Function::ProfileCount> FC,
| ^
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:884:58: error: ‘ProfileCount’ is not a member of ‘llvm::Function’
884 | std::optional<Function::ProfileCount> GC) {
| ^~~~~~~~~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:884:70: error: template argument 1 is invalid
884 | std::optional<Function::ProfileCount> GC) {
| ^
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In function ‘void mergeEntryCountsInto(llvm::Function*, int, int)’:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:887:39: error: base operand of ‘->’ is not a pointer
887 | uint64_t Sum = SaturatingAdd(FC ? FC->getCount() : uint64_t{0},
| ^~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:888:39: error: base operand of ‘->’ is not a pointer
888 | GC ? GC->getCount() : uint64_t{0});
| ^~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In member function ‘void {anonymous}::MergeFunctions::mergeTwoFunctions(llvm::Function*, llvm::Function*)’:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:895:27: error: ‘ProfileCount’ is not a member of ‘llvm::Function’
```
</details>
https://github.com/llvm/llvm-project/pull/202218
More information about the llvm-commits
mailing list