Skip to content

[ReachingDefAnalysis] Simpilify getGlobalReachingDefs#175169

Closed
mgudim wants to merge 1 commit intollvm:mainfrom
mgudim:rda_refactor
Closed

[ReachingDefAnalysis] Simpilify getGlobalReachingDefs#175169
mgudim wants to merge 1 commit intollvm:mainfrom
mgudim:rda_refactor

Conversation

@mgudim
Copy link
Copy Markdown
Contributor

@mgudim mgudim commented Jan 9, 2026

This call to getUniqueReachingMIDefwas an overkill. Replace it with simplergetReachingLocalMIDef`.

This call to getUniqueReachingMIDef` was an overkill. Replace it with simpler
`getReachingLocalMIDef`.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2026

🐧 Linux x64 Test Results

  • 3076 tests passed
  • 7 tests skipped

All executed tests passed, but another part of the build failed. Click on a failure below to see the details.

lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.o
sccache /opt/llvm/bin/clang++ -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/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/CodeGen -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/ReachingDefAnalysis.cpp:537:63: error: expected expression
537 |   if (MachineInstr *LocalDef = getReachingLocalMIDef(MI, Reg);) {
|                                                               ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/ReachingDefAnalysis.cpp:538:17: error: use of undeclared identifier 'Def'; did you mean 'Defs'?
538 |     Defs.insert(Def);
|                 ^~~
|                 Defs
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/ReachingDefAnalysis.cpp:535:54: note: 'Defs' declared here
535 |                                             InstSet &Defs) const {
|                                                      ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/ReachingDefAnalysis.cpp:538:10: error: no matching member function for call to 'insert'
538 |     Defs.insert(Def);
|     ~~~~~^~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:389:29: note: candidate function not viable: no known conversion from 'InstSet' (aka 'SmallPtrSetImpl<MachineInstr *>') to 'llvm::MachineInstr *' for 1st argument
389 |   std::pair<iterator, bool> insert(PtrType Ptr) {
|                             ^      ~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:470:8: note: candidate function not viable: no known conversion from 'InstSet' (aka 'SmallPtrSetImpl<MachineInstr *>') to 'std::initializer_list<llvm::MachineInstr *>' for 1st argument
470 |   void insert(std::initializer_list<PtrType> IL) {
|        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:397:12: note: candidate function not viable: requires 2 arguments, but 1 was provided
397 |   iterator insert(iterator, PtrType Ptr) { return insert(Ptr).first; }
|            ^      ~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:465:34: note: candidate function template not viable: requires 2 arguments, but 1 was provided
465 |   template <typename IterT> void insert(IterT I, IterT E) {
|                                  ^      ~~~~~~~~~~~~~~~~
3 errors generated.

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2026

🪟 Windows x64 Test Results

  • 3015 tests passed
  • 29 tests skipped

All executed tests passed, but another part of the build failed. Click on a failure below to see the details.

[code=1] lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.obj
FAILED: [code=1] lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ReachingDefAnalysis.cpp.obj
sccache C:\clang\clang-msvc\bin\clang-cl.exe  /nologo -TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\CodeGen -IC:\_work\llvm-project\llvm-project\llvm\lib\CodeGen -Iinclude -IC:\_work\llvm-project\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -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 /Gw /O2 /Ob2  -MD -UNDEBUG /EHs-c- /GR- -std:c++17 /showIncludes /Folib\CodeGen\CMakeFiles\LLVMCodeGen.dir\ReachingDefAnalysis.cpp.obj /Fdlib\CodeGen\CMakeFiles\LLVMCodeGen.dir\LLVMCodeGen.pdb -c -- C:\_work\llvm-project\llvm-project\llvm\lib\CodeGen\ReachingDefAnalysis.cpp
C:\_work\llvm-project\llvm-project\llvm\lib\CodeGen\ReachingDefAnalysis.cpp(537,63): error: expected expression
537 |   if (MachineInstr *LocalDef = getReachingLocalMIDef(MI, Reg);) {
|                                                               ^
C:\_work\llvm-project\llvm-project\llvm\lib\CodeGen\ReachingDefAnalysis.cpp(538,17): error: use of undeclared identifier 'Def'; did you mean 'Defs'?
538 |     Defs.insert(Def);
|                 ^~~
|                 Defs
C:\_work\llvm-project\llvm-project\llvm\lib\CodeGen\ReachingDefAnalysis.cpp(535,54): note: 'Defs' declared here
535 |                                             InstSet &Defs) const {
|                                                      ^
C:\_work\llvm-project\llvm-project\llvm\lib\CodeGen\ReachingDefAnalysis.cpp(538,10): error: no matching member function for call to 'insert'
538 |     Defs.insert(Def);
|     ~~~~~^~~~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallPtrSet.h(389,29): note: candidate function not viable: no known conversion from 'InstSet' (aka 'SmallPtrSetImpl<MachineInstr *>') to 'llvm::MachineInstr *' for 1st argument
389 |   std::pair<iterator, bool> insert(PtrType Ptr) {
|                             ^      ~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallPtrSet.h(470,8): note: candidate function not viable: no known conversion from 'InstSet' (aka 'SmallPtrSetImpl<MachineInstr *>') to 'std::initializer_list<llvm::MachineInstr *>' for 1st argument
470 |   void insert(std::initializer_list<PtrType> IL) {
|        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallPtrSet.h(397,12): note: candidate function not viable: requires 2 arguments, but 1 was provided
397 |   iterator insert(iterator, PtrType Ptr) { return insert(Ptr).first; }
|            ^      ~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallPtrSet.h(465,34): note: candidate function template not viable: requires 2 arguments, but 1 was provided
465 |   template <typename IterT> void insert(IterT I, IterT E) {
|                                  ^      ~~~~~~~~~~~~~~~~
3 errors generated.

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

@mgudim mgudim closed this Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant