mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
RegisterPressure: Add PressureDiff::dump()
Also display the pressure diff in the case of a getMaxUpwardPressureDelta() verify failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a6f54545f
commit
6e999b0a30
@ -135,6 +135,8 @@ public:
|
||||
|
||||
void addPressureChange(unsigned RegUnit, bool IsDec,
|
||||
const MachineRegisterInfo *MRI);
|
||||
|
||||
LLVM_DUMP_METHOD void dump(const TargetRegisterInfo &TRI) const;
|
||||
};
|
||||
|
||||
/// Array of PressureDiffs.
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user