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

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 04:55:25 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)) {
----------------
ostannard wrote:

I think this way is clearer than adding an optional parameter which changes the behaviour of the existing function.

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


More information about the llvm-commits mailing list