[llvm] [RegAlloc] Account for use availability when applying rematerializable weight discount (PR #159180)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 07:18:55 PDT 2025


================
@@ -124,6 +124,17 @@ bool VirtRegAuxInfo::isRematerializable(const LiveInterval &LI,
 
     if (!TII.isTriviallyReMaterializable(*MI))
       return false;
+
+    // If MI has register uses, it will only be rematerializable if its uses are
----------------
preames wrote:

I agree the prior way of doing it was correct, thanks for the pointer.  The new way is much much cleaner structure, thank you!

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


More information about the llvm-commits mailing list