]> granicus.if.org Git - llvm/commitdiff
[NFC] Add a couple of dump routines for RegisterPressure helper classes
authorPhilip Reames <listmail@philipreames.com>
Thu, 15 Aug 2019 18:49:39 +0000 (18:49 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 15 Aug 2019 18:49:39 +0000 (18:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369037 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/RegisterPressure.h
lib/CodeGen/RegisterPressure.cpp

index 996f83d3b4aa5e59d1fdf7644dbd7231064b27f4..92333b859f1bbedc69e2a7b18052e764e74c3458 100644 (file)
@@ -129,6 +129,8 @@ public:
   bool operator==(const PressureChange &RHS) const {
     return PSetID == RHS.PSetID && UnitInc == RHS.UnitInc;
   }
+
+  void dump() const;
 };
 
 /// List of PressureChanges in order of increasing, unique PSetID.
@@ -248,6 +250,7 @@ struct RegPressureDelta {
   bool operator!=(const RegPressureDelta &RHS) const {
     return !operator==(RHS);
   }
+  void dump() const;
 };
 
 /// A set of live virtual registers and physical register units.
index cdcbabfa258111660925097c940766ed851844bd..8a287635c81bbbee2935fc1da38359ab20a240ba 100644 (file)
@@ -134,6 +134,22 @@ void PressureDiff::dump(const TargetRegisterInfo &TRI) const {
   }
   dbgs() << '\n';
 }
+
+LLVM_DUMP_METHOD
+void PressureChange::dump() const {
+  dbgs() << "[" << getPSetOrMax() << ", " << getUnitInc() << "]\n";
+}
+
+void RegPressureDelta::dump() const {
+  dbgs() << "[Excess=";
+  Excess.dump();
+  dbgs() << ", CriticalMax=";
+  CriticalMax.dump();
+  dbgs() << ", CurrentMax=";
+  CurrentMax.dump();
+  dbgs() << "]\n";
+}
+
 #endif
 
 void RegPressureTracker::increaseRegPressure(unsigned RegUnit,