[llvm] [AMDGPU] Add live-through register set printing to GCNRegPressurePrinter pass. (PR #71096)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 16:47:11 PDT 2023


================
@@ -496,6 +496,34 @@ char &llvm::GCNRegPressurePrinterID = GCNRegPressurePrinter::ID;
 
 INITIALIZE_PASS(GCNRegPressurePrinter, "amdgpu-print-rp", "", true, true)
 
+// Return lanemask of Reg's subregs that are live-through at [Begin, End] and
+// are fully covered by Mask.
+static LaneBitmask
+getRegLiveThroughMask(const MachineRegisterInfo &MRI, const LiveIntervals &LIS,
+                      Register Reg, SlotIndex Begin, SlotIndex End,
+                      LaneBitmask Mask = LaneBitmask::getAll()) {
+
+  auto IsInOneSegment = [Begin, End](const LiveRange &LR) -> bool {
----------------
arsenm wrote:

Is this the same as LiveInterval::isLocal?

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


More information about the llvm-commits mailing list