diff options
-rw-r--r-- | lib/CodeGen/RegisterPressure.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegisterPressure.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/RegisterPressure.cpp b/lib/CodeGen/RegisterPressure.cpp index 7b86899b17..53036c7b84 100644 --- a/lib/CodeGen/RegisterPressure.cpp +++ b/lib/CodeGen/RegisterPressure.cpp @@ -578,12 +578,12 @@ static int computeMaxPressureDelta(ArrayRef<unsigned> OldPressureVec, unsigned Limit = TRI->getRegPressureSetLimit(i); if (Limit > POld) { if (Limit > PNew) - PDiff = 0; // Under the limit + PDiff = 0; // Under the limit else PDiff = PNew - Limit; // Just exceeded limit. } else if (Limit > PNew) - PDiff = Limit - POld; // Just obeyed limit. + PDiff = Limit - POld; // Just obeyed limit. if (std::abs(PDiff) > std::abs(ExcessUnits)) { ExcessUnits = PDiff; diff --git a/lib/CodeGen/RegisterPressure.h b/lib/CodeGen/RegisterPressure.h index e4a27176b4..b1d1378401 100644 --- a/lib/CodeGen/RegisterPressure.h +++ b/lib/CodeGen/RegisterPressure.h @@ -218,6 +218,7 @@ public: void getMaxPressureDelta(const MachineInstr *MI, RegPressureDelta &Delta) { if (isTopClosed()) return getMaxDownwardPressureDelta(MI, Delta); + assert(isBottomClosed() && "Uninitialized pressure tracker"); return getMaxUpwardPressureDelta(MI, Delta); } |