[llvm] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 14:41:25 PDT 2023


================
@@ -487,3 +488,77 @@ LLVM_DUMP_METHOD
 void GCNRegPressure::dump() const { dbgs() << print(*this); }
 
 #endif
+
+char llvm::GCNRegPressurePrinter::ID = 0;
+char &llvm::GCNRegPressurePrinterID = GCNRegPressurePrinter::ID;
+
+INITIALIZE_PASS(GCNRegPressurePrinter, "amdgpu-print-rp", "", true, true)
+
+bool GCNRegPressurePrinter::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(MF.getFunction()))
+    return false;
+
+  const MachineRegisterInfo &MRI = MF.getRegInfo();
+  const LiveIntervals &LIS = getAnalysis<LiveIntervals>();
+  GCNUpwardRPTracker RPT(LIS);
----------------
rampitec wrote:

I thought we are using GCNDownwardRPTracker in the scheduling.

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


More information about the llvm-commits mailing list