[llvm] [AMDGPU] NFC: Provide RPTracker interface for external iterators (PR #93088)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 13:38:22 PDT 2024


================
@@ -333,19 +333,21 @@ getLanesWithProperty(const LiveIntervals &LIS, const MachineRegisterInfo &MRI,
 static LaneBitmask findUseBetween(unsigned Reg, LaneBitmask LastUseMask,
                                   SlotIndex PriorUseIdx, SlotIndex NextUseIdx,
                                   const MachineRegisterInfo &MRI,
+                                  const SIRegisterInfo *TRI,
                                   const LiveIntervals *LIS,
                                   bool Upward = false) {
-  const TargetRegisterInfo &TRI = *MRI.getTargetRegisterInfo();
-  for (const MachineOperand &MO : MRI.use_nodbg_operands(Reg)) {
+  for (const MachineOperand &MO : MRI.reg_nodbg_operands(Reg)) {
     if (MO.isUndef())
       continue;
+    if (!MO.readsReg())
----------------
arsenm wrote:

It's this instead of isUndef, not with 

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


More information about the llvm-commits mailing list