[llvm] [AMDGPU] Use correct SlotIndex to calculate live-out register set. (PR #161720)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 17:57:35 PDT 2025


================
@@ -467,16 +467,29 @@ class raw_ostream;
       return getMBBRange(mbb).first;
     }
 
-    /// Returns the last index in the given basic block number.
+    /// Returns the index past the last valid index in the given basic block.
     SlotIndex getMBBEndIdx(unsigned Num) const {
       return getMBBRange(Num).second;
     }
 
-    /// Returns the last index in the given basic block.
+    /// Returns the index past the last valid index in the given basic block.
     SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const {
       return getMBBRange(mbb).second;
     }
 
+    /// Returns the last valid index in the given basic block.
----------------
arsenm wrote:

Isn't this what  isLiveOutOfMBB is for? Which is just using getMBBEndIdx.getPrevSlot() 

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


More information about the llvm-commits mailing list