[llvm] [AMDGPU][MachineRegisterInfo] Extend the MRI live-ins check to account for Subreg (PR #126926)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 08:53:19 PST 2025


================
@@ -1020,7 +1020,7 @@ class MachineRegisterInfo {
     return LiveIns;
   }
 
-  bool isLiveIn(Register Reg) const;
+  bool isLiveIn(Register Reg, bool CheckForSubreg = false) const;
----------------
arsenm wrote:

I think that if we do this, it should not be an option. It should simply be unconditional.

However, I think we need better documented rules for whatever is supposed to be in the livein list. The MachineFunction liveins, for whatever reason, behave differently from MachineBasicBlock's liveins. Why don't they both use the physreg + lane mask?

However, I still think we should replace all of the livein references to be directly in terms of regunits 

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


More information about the llvm-commits mailing list