Skip to content

Conversation

@lucas-rami
Copy link
Contributor

@lucas-rami lucas-rami commented Jan 13, 2026

On some configurations sorting ScoredRemat objects which contains const members causes a compile failure due to impossibility of swapping/moving objects. The problem was introduced in #175050.

This removes const from those fields to address the issue. The design will soon change anyway to not rely on sorting objects of this type, and consts were only here for semantic clarity.

On some configurations sorting `ScoredRemat` objects which contains
const members fails due to impossibility of swapping elements.

This removes const from those fields to address the issue. The design
will soon change anyway to not rely on sorting objects of this type, and
consts were only here for semantic clarity.
@RKSimon
Copy link
Collaborator

RKSimon commented Jan 13, 2026

Seeing this with the above fix:

E:\llvm\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(2221): error C2440: 'initializing': cannot convert from 'const llvm::PreRARematStage::RematReg *' to 'llvm::PreRARematStage::RematReg *'
E:\llvm\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(2221): note: Conversion loses qualifiers
E:\llvm\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(2221): error C2439: 'llvm::PreRARematStage::ScoredRemat::Remat': member could not be initialized
E:\llvm\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h(515): note: see declaration of 'llvm::PreRARematStage::ScoredRemat::Remat'

@lucas-rami
Copy link
Contributor Author

Thanks for the catch (my local compilation flow had not finished the re-compile), 7a74ba0 should fix this.

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 3080 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/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.o
FAILED: lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.o
sccache /opt/llvm/bin/clang++ -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/Target/AMDGPU -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU -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 -fvisibility=hidden -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.o -MF lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.o.d -o lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:16:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNRegPressure.h:20:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSubtarget.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:14:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:950:33: error: no matching constructor for initialization of 'llvm::PreRARematStage::ScoredRemat'
950 |     ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...);
|                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:1400:18: note: in instantiation of function template specialization 'llvm::SmallVectorImpl<llvm::PreRARematStage::ScoredRemat>::emplace_back<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
1400 |     ScoredRemats.emplace_back(&Remat, FreqInfo, DAG);
|                  ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:2218:31: note: candidate constructor not viable: 1st argument ('const llvm::PreRARematStage::RematReg *') would lose const qualifier
2218 | PreRARematStage::ScoredRemat::ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
|                               ^           ~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:513:10: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:513:10: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:26:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:16:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNRegPressure.h:20:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSubtarget.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h:17:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:14:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:559:15: error: no matching constructor for initialization of 'llvm::PreRARematStage::ScoredRemat'
559 |     push_back(T(std::forward<ArgTypes>(Args)...));
|               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/SmallVector.h:948:20: note: in instantiation of function template specialization 'llvm::SmallVectorTemplateBase<llvm::PreRARematStage::ScoredRemat>::growAndEmplaceBack<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
948 |       return this->growAndEmplaceBack(std::forward<ArgTypes>(Args)...);
|                    ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:1400:18: note: in instantiation of function template specialization 'llvm::SmallVectorImpl<llvm::PreRARematStage::ScoredRemat>::emplace_back<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
1400 |     ScoredRemats.emplace_back(&Remat, FreqInfo, DAG);
|                  ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:2218:31: note: candidate constructor not viable: 1st argument ('const llvm::PreRARematStage::RematReg *') would lose const qualifier
2218 | PreRARematStage::ScoredRemat::ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
|                               ^           ~~~~~~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:513:10: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h:513:10: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
2 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

🪟 Windows x64 Test Results

  • 3019 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/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.obj
FAILED: [code=1] lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/GCNSchedStrategy.cpp.obj
sccache C:\clang\clang-msvc\bin\clang-cl.exe  /nologo -TP -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\Target\AMDGPU -IC:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU -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\Target\AMDGPU\CMakeFiles\LLVMAMDGPUCodeGen.dir\GCNSchedStrategy.cpp.obj /Fdlib\Target\AMDGPU\CMakeFiles\LLVMAMDGPUCodeGen.dir\LLVMAMDGPUCodeGen.pdb -c -- C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp:26:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNRegPressure.h:20:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSubtarget.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\AMDGPUCallLowering.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/CodeGen/GlobalISel/CallLowering.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/ArrayRef.h:14:
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallVector.h(950,33): error: no matching constructor for initialization of 'llvm::PreRARematStage::ScoredRemat'
950 |     ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...);
|                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(1400,18): note: in instantiation of function template specialization 'llvm::SmallVectorImpl<llvm::PreRARematStage::ScoredRemat>::emplace_back<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
1400 |     ScoredRemats.emplace_back(&Remat, FreqInfo, DAG);
|                  ^
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(2218,31): note: candidate constructor not viable: 1st argument ('const llvm::PreRARematStage::RematReg *') would lose const qualifier
2218 | PreRARematStage::ScoredRemat::ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
|                               ^           ~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h(513,10): note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h(513,10): note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp:26:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNRegPressure.h:20:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSubtarget.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\AMDGPUCallLowering.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/CodeGen/GlobalISel/CallLowering.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/ArrayRef.h:14:
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallVector.h(559,15): error: no matching constructor for initialization of 'llvm::PreRARematStage::ScoredRemat'
559 |     push_back(T(std::forward<ArgTypes>(Args)...));
|               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\include\llvm/ADT/SmallVector.h(948,20): note: in instantiation of function template specialization 'llvm::SmallVectorTemplateBase<llvm::PreRARematStage::ScoredRemat>::growAndEmplaceBack<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
948 |       return this->growAndEmplaceBack(std::forward<ArgTypes>(Args)...);
|                    ^
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(1400,18): note: in instantiation of function template specialization 'llvm::SmallVectorImpl<llvm::PreRARematStage::ScoredRemat>::emplace_back<const llvm::PreRARematStage::RematReg *, const llvm::PreRARematStage::ScoredRemat::FreqInfo &, llvm::GCNScheduleDAGMILive &>' requested here
1400 |     ScoredRemats.emplace_back(&Remat, FreqInfo, DAG);
|                  ^
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.cpp(2218,31): note: candidate constructor not viable: 1st argument ('const llvm::PreRARematStage::RematReg *') would lose const qualifier
2218 | PreRARematStage::ScoredRemat::ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
|                               ^           ~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h(513,10): note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\lib\Target\AMDGPU\GCNSchedStrategy.h(513,10): note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
513 |   struct ScoredRemat {
|          ^~~~~~~~~~~
2 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.

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - cheers

@lucas-rami lucas-rami merged commit 125d24a into llvm:main Jan 13, 2026
10 of 11 checks passed
@lucas-rami
Copy link
Contributor Author

Thanks for the help and my apologies for the mess.

@jplehr
Copy link
Contributor

jplehr commented Jan 13, 2026

We still see the HIP tester broken (https://lab.llvm.org/buildbot/#/builders/123/builds/33483)
I'm going to test a local revert.

@llvmbot
Copy link
Member

llvmbot commented Jan 13, 2026

@llvm/pr-subscribers-backend-amdgpu

Author: Lucas Ramirez (lucas-rami)

Changes

On some configurations sorting ScoredRemat objects which contains const members causes a compile failure due to impossibility of swapping/moving objects. The problem was introduced in #175050.

This removes const from those fields to address the issue. The design will soon change anyway to not rely on sorting objects of this type, and consts were only here for semantic clarity.


Full diff: https://github.com/llvm/llvm-project/pull/175755.diff

2 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp (+2-3)
  • (modified) llvm/lib/Target/AMDGPU/GCNSchedStrategy.h (+4-4)
diff --git a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
index cb0cb6510ecd4..16644a03f089a 100644
--- a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -1396,7 +1396,7 @@ bool PreRARematStage::initGCNSchedStage() {
   });
 
   SmallVector<ScoredRemat> ScoredRemats;
-  for (const RematReg &Remat : RematRegs)
+  for (RematReg &Remat : RematRegs)
     ScoredRemats.emplace_back(&Remat, FreqInfo, DAG);
 
 // Rematerialize registers in successive rounds until all RP targets are
@@ -2215,8 +2215,7 @@ PreRARematStage::ScoredRemat::FreqInfo::FreqInfo(
   }
 }
 
-PreRARematStage::ScoredRemat::ScoredRemat(const RematReg *Remat,
-                                          const FreqInfo &Freq,
+PreRARematStage::ScoredRemat::ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
                                           const GCNScheduleDAGMILive &DAG)
     : Remat(Remat), NumRegs(getNumRegs(DAG)), FreqDiff(getFreqDiff(Freq)) {}
 
diff --git a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
index a5c4c960b1f31..00876601cbc77 100644
--- a/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+++ b/llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
@@ -512,7 +512,7 @@ class PreRARematStage : public GCNSchedStage {
   /// is not helpful to reduce RP in target regions.
   struct ScoredRemat {
     /// The rematerializable register under consideration.
-    const RematReg *Remat;
+    RematReg *Remat;
 
     /// Execution frequency information required by scoring heuristics.
     /// Frequencies are scaled down if they are high to avoid overflow/underflow
@@ -531,7 +531,7 @@ class PreRARematStage : public GCNSchedStage {
 
     /// This only initializes state-independent characteristics of \p Remat, not
     /// the actual score.
-    ScoredRemat(const RematReg *Remat, const FreqInfo &Freq,
+    ScoredRemat(RematReg *Remat, const FreqInfo &Freq,
                 const GCNScheduleDAGMILive &DAG);
 
     /// Updates the rematerialization's score w.r.t. the current \p RPTargets.
@@ -570,7 +570,7 @@ class PreRARematStage : public GCNSchedStage {
 
   private:
     /// Number of 32-bit registers this rematerialization covers.
-    const unsigned NumRegs;
+    unsigned NumRegs;
 
     // The three members below are the scoring components, top to bottom from
     // most important to least important when comparing candidates.
@@ -582,7 +582,7 @@ class PreRARematStage : public GCNSchedStage {
     /// Frequency difference between defining and using regions. Negative values
     /// indicate we are rematerializing to higher frequency regions; positive
     /// values indicate the contrary.
-    const int64_t FreqDiff;
+    int64_t FreqDiff;
     /// Expected number of target regions impacted by the rematerialization,
     /// scaled by the size of the register being rematerialized.
     unsigned RegionImpact;

lucas-rami added a commit to lucas-rami/llvm-project that referenced this pull request Jan 13, 2026
lucas-rami added a commit to lucas-rami/llvm-project that referenced this pull request Jan 13, 2026
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Jan 18, 2026
…llvm#175755)

On some configurations sorting `ScoredRemat` objects which contains
const members causes a compile failure due to impossibility of
swapping/moving objects. The problem was introduced in llvm#175050.

This removes const from those fields to address the issue. The design
will soon change anyway to not rely on sorting objects of this type, and
consts were only here for semantic clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants