diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/RegisterPressure.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegisterPressure.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp index 7b86899b17a..53036c7b84d 100644 --- a/llvm/lib/CodeGen/RegisterPressure.cpp +++ b/llvm/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/llvm/lib/CodeGen/RegisterPressure.h b/llvm/lib/CodeGen/RegisterPressure.h index e4a27176b4a..b1d13784018 100644 --- a/llvm/lib/CodeGen/RegisterPressure.h +++ b/llvm/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); } |