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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 03:51:29 PDT 2025


================
@@ -79,7 +80,7 @@ Register VirtRegAuxInfo::copyHint(const MachineInstr *MI, Register Reg,
 
 // Check if all values in LI are rematerializable
 bool VirtRegAuxInfo::isRematerializable(const LiveInterval &LI,
-                                        const LiveIntervals &LIS,
+                                        LiveIntervals &LIS,
----------------
lukel97 wrote:

Then we can't reuse LiveRangeEdit, we'll need to pull out allUsesAvailableAt into LiveIntervals or something which is what I originally did prior to https://github.com/llvm/llvm-project/pull/159180/commits/0ca6a240a79442a80109f5b6f4d04c981f56d941

Happy to go ahead and do this if you are

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


More information about the llvm-commits mailing list