[llvm] [MachineLICM] Do not rely on hasSideEffect when handling impdefs (PR #145379)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 3 12:43:57 PDT 2025


atrosinenko wrote:

The test failure looks unrelated:
```
2025-07-03T17:09:06.5937349Z CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/Target/AArch64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Target/AArch64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AArch64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Target/AArch64 -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googletest/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/third-party/unittest/googlemock/include -gmlt -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 -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/AArch64SelectionDAGTest.cpp.o -MF unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/AArch64SelectionDAGTest.cpp.o.d -o unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/AArch64SelectionDAGTest.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp
2025-07-03T17:09:06.5945157Z /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Target/AArch64/AArch64SelectionDAGTest.cpp:65:10: error: no matching member function for call to 'init'
2025-07-03T17:09:06.5945952Z    65 |     DAG->init(*MF, ORE, nullptr, nullptr, nullptr, nullptr, nullptr, MMI,
2025-07-03T17:09:06.5946363Z       |     ~~~~~^~~~
2025-07-03T17:09:06.5947046Z /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h:472:17: note: candidate function not viable: requires 10 arguments, but 9 were provided
2025-07-03T17:09:06.5947891Z   472 |   LLVM_ABI void init(MachineFunction &NewMF, OptimizationRemarkEmitter &NewORE,
2025-07-03T17:09:06.5948282Z       |                 ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5948605Z   473 |                      Pass *PassPtr, const TargetLibraryInfo *LibraryInfo,
2025-07-03T17:09:06.5948915Z       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5949270Z   474 |                      UniformityInfo *UA, ProfileSummaryInfo *PSIin,
2025-07-03T17:09:06.5949577Z       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5949880Z   475 |                      BlockFrequencyInfo *BFIin, MachineModuleInfo &MMI,
2025-07-03T17:09:06.5950197Z       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5950516Z   476 |                      FunctionVarLocs const *FnVarLocs, bool HasDivergency);
2025-07-03T17:09:06.5950852Z       |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5951606Z /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h:478:8: note: candidate function not viable: requires 10 arguments, but 9 were provided
2025-07-03T17:09:06.5952434Z   478 |   void init(MachineFunction &NewMF, OptimizationRemarkEmitter &NewORE,
2025-07-03T17:09:06.5953062Z       |        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5953374Z   479 |             MachineFunctionAnalysisManager &AM,
2025-07-03T17:09:06.5953640Z       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5953947Z   480 |             const TargetLibraryInfo *LibraryInfo, UniformityInfo *UA,
2025-07-03T17:09:06.5954271Z       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5954600Z   481 |             ProfileSummaryInfo *PSIin, BlockFrequencyInfo *BFIin,
2025-07-03T17:09:06.5954908Z       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5955231Z   482 |             MachineModuleInfo &MMI, FunctionVarLocs const *FnVarLocs,
2025-07-03T17:09:06.5955553Z       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5955810Z   483 |             bool HasDivergency) {
2025-07-03T17:09:06.5956038Z       |             ~~~~~~~~~~~~~~~~~~
2025-07-03T17:09:06.5956245Z 1 error generated.
```
By the way, the PRs stacked on top of this one passed the tests - maybe `check-llvm-unit` tests are not executed for these PRs.

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


More information about the llvm-commits mailing list