[llvm] [AMDGPU][Scheduler] Scoring system for rematerialization candidates (PR #153092)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 16:24:22 PDT 2025


================
@@ -1782,31 +1951,32 @@ bool PreRARematStage::canIncreaseOccupancyOrReduceSpill() {
       if (!isTriviallyReMaterializable(DefMI))
         continue;
 
-      // We only support rematerializing virtual registers with one definition.
+      // We only support rematerializing virtual registers with one
+      // definition.
----------------
jrbyrnes wrote:

Not directly related to this PR, but I think we also need to check either that the use operands of the remat candidate only have 1 def, or, preferably, when doing the remat we check that the reaching def of the uses is the same as the original def.

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


More information about the llvm-commits mailing list