Add debug output for rematerializable instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-04-20 22:14:20 +00:00
parent 08c5a347a0
commit 3b7d917dec
3 changed files with 10 additions and 6 deletions

View File

@ -420,8 +420,10 @@ void InlineSpiller::analyzeSiblingValues() {
}
if (!DefMI && !VNI->isPHIDef())
DefMI = LIS.getInstructionFromIndex(VNI->def);
if (DefMI)
Edit->checkRematerializable(VNI, DefMI, TII, AA);
if (DefMI && Edit->checkRematerializable(VNI, DefMI, TII, AA)) {
DEBUG(dbgs() << "Value " << PrintReg(Reg) << ':' << VNI->id << '@'
<< VNI->def << " may remat from " << *DefMI);
}
}
}
}

View File

@ -36,14 +36,16 @@ LiveInterval &LiveRangeEdit::createFrom(unsigned OldReg,
return LI;
}
void LiveRangeEdit::checkRematerializable(VNInfo *VNI,
bool LiveRangeEdit::checkRematerializable(VNInfo *VNI,
const MachineInstr *DefMI,
const TargetInstrInfo &tii,
AliasAnalysis *aa) {
assert(DefMI && "Missing instruction");
if (tii.isTriviallyReMaterializable(DefMI, aa))
remattable_.insert(VNI);
scannedRemattable_ = true;
if (!tii.isTriviallyReMaterializable(DefMI, aa))
return false;
remattable_.insert(VNI);
return true;
}
void LiveRangeEdit::scanRemattable(LiveIntervals &lis,

View File

@ -137,7 +137,7 @@ public:
/// checkRematerializable - Manually add VNI to the list of rematerializable
/// values if DefMI may be rematerializable.
void checkRematerializable(VNInfo *VNI, const MachineInstr *DefMI,
bool checkRematerializable(VNInfo *VNI, const MachineInstr *DefMI,
const TargetInstrInfo&, AliasAnalysis*);
/// Remat - Information needed to rematerialize at a specific location.