mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
08c5a347a0
commit
3b7d917dec
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user