[llvm] [MachineCP] Correctly handle register masks and sub-registers (PR #122734)

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 08:09:45 PST 2025


================
@@ -164,64 +189,70 @@ class CopyTracker {
       Copies.erase(Unit);
   }
 
-  /// Clobber a single register, removing it from the tracker's copy maps.
-  void clobberRegister(MCRegister Reg, const TargetRegisterInfo &TRI,
-                       const TargetInstrInfo &TII, bool UseCopyInstr) {
-    for (MCRegUnit Unit : TRI.regunits(Reg)) {
----------------
bzEq wrote:

How about we keep this method and adding a filter BitVector to indicate which regunit should be really clobbered?

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


More information about the llvm-commits mailing list