1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

[NFC] Add a couple of dump routines for RegisterPressure helper classes

llvm-svn: 369037
This commit is contained in:
Philip Reames 2019-08-15 18:49:39 +00:00
parent 5351d79a67
commit 46452ca1b7
2 changed files with 19 additions and 0 deletions

View 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.

View 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,