summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-07-08 23:40:27 +0000
committerMatthias Braun <matze@braunis.de>2015-07-08 23:40:27 +0000
commit91e85d4327856aa9bdb0236caeb31c95099afa65 (patch)
tree50f7eb08014990960849b603c90e5bbcfef8edd2 /llvm/lib/CodeGen
parentcca0cb6ce2fcd06bd15b124e74bca0f04a34228f (diff)
downloadbcm5719-llvm-91e85d4327856aa9bdb0236caeb31c95099afa65.tar.gz
bcm5719-llvm-91e85d4327856aa9bdb0236caeb31c95099afa65.zip
RegisterPressure: Add PressureDiff::dump()
Also display the pressure diff in the case of a getMaxUpwardPressureDelta() verify failure. llvm-svn: 241759
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterPressure.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp
index 450a3051c6f..c3786e552a1 100644
--- a/llvm/lib/CodeGen/RegisterPressure.cpp
+++ b/llvm/lib/CodeGen/RegisterPressure.cpp
@@ -77,6 +77,16 @@ void RegPressureTracker::dump() const {
P.dump(TRI);
}
+void PressureDiff::dump(const TargetRegisterInfo &TRI) const {
+ for (const PressureChange &Change : *this) {
+ if (!Change.isValid() || Change.getUnitInc() == 0)
+ continue;
+ dbgs() << " " << TRI.getRegPressureSetName(Change.getPSet())
+ << " " << Change.getUnitInc();
+ }
+ dbgs() << '\n';
+}
+
/// Increase the current pressure as impacted by these registers and bump
/// the high water mark if needed.
void RegPressureTracker::increaseRegPressure(ArrayRef<unsigned> RegUnits) {
@@ -787,6 +797,8 @@ getMaxUpwardPressureDelta(const MachineInstr *MI, PressureDiff *PDiff,
RegPressureDelta Delta2;
getUpwardPressureDelta(MI, *PDiff, Delta2, CriticalPSets, MaxPressureLimit);
if (Delta != Delta2) {
+ dbgs() << "PDiff: ";
+ PDiff->dump(*TRI);
dbgs() << "DELTA: " << *MI;
if (Delta.Excess.isValid())
dbgs() << "Excess1 " << TRI->getRegPressureSetName(Delta.Excess.getPSet())
OpenPOWER on IntegriCloud