[llvm] [AMDGPU] GCNRegPressure printing pass for testing. (PR #70031)
    Carl Ritson via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Oct 24 22:53:35 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);
----------------
perlfu wrote:
What kind of difference are we expecting between the two?
Would it makes sense if it was configurable?
https://github.com/llvm/llvm-project/pull/70031
    
    
More information about the llvm-commits
mailing list