[llvm] [MergeFunctions] Preserve entry counts on folds (PR #202218)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 06:58:34 PDT 2026
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-nvptx64-nvidia-ubuntu` running on `as-builder-7` while building `llvm` at step 5 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/40447
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (build-unified-tree) failure: build (failure)
...
130 | DominanceFrontierBase<BasicBlock, false>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Passes/PassBuilder.cpp:69:
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/include/llvm/Analysis/RegionInfo.h:898:41: warning: type attributes ignored after type is already defined [-Wattributes]
898 | extern template class LLVM_TEMPLATE_ABI RegionBase<RegionTraits<Function>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/include/llvm/Analysis/RegionInfo.h:899:41: warning: type attributes ignored after type is already defined [-Wattributes]
899 | extern template class LLVM_TEMPLATE_ABI RegionNodeBase<RegionTraits<Function>>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42.614 [734/5/2211] 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/c++ -DLLVM_EXPORTS -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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/lib/Transforms/IPO -I/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO -I/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/build/include -I/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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-dangling-reference -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -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 -std=c++17 -fPIC -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In member function ‘void {anonymous}::MergeFunctions::writeThunk(llvm::Function*, llvm::Function*)’:
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:808:27: error: invalid type argument of unary ‘*’ (have ‘int’)
808 | NewG->setEntryCount(*GEC);
| ^~~~
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: At global scope:
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:883:70: error: template argument 1 is invalid
883 | std::optional<Function::ProfileCount> FC,
| ^
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:884:70: error: template argument 1 is invalid
884 | std::optional<Function::ProfileCount> GC) {
| ^
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In function ‘void mergeEntryCountsInto(llvm::Function*, int, int)’:
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp: In member function ‘void {anonymous}::MergeFunctions::mergeTwoFunctions(llvm::Function*, llvm::Function*)’:
/home/buildbot/worker/as-builder-7/llvm-nvptx64-nvidia-ubuntu/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