summaryrefslogtreecommitdiff
path: root/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-19 23:02:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-19 23:02:47 +0000
commitc1655e1a3c3a566b91b0513b56d61b58da1e36ba (patch)
treea5549c60e008246b7a8c68022a7797cc7faed85c /lib/CodeGen/InlineSpiller.cpp
parentf6474f69d3c3298499a4767f445f928fb83cd4d3 (diff)
downloadllvm-c1655e1a3c3a566b91b0513b56d61b58da1e36ba.tar.gz
llvm-c1655e1a3c3a566b91b0513b56d61b58da1e36ba.tar.bz2
llvm-c1655e1a3c3a566b91b0513b56d61b58da1e36ba.tar.xz
Add debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--lib/CodeGen/InlineSpiller.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp
index ab9054c77f..7f7c15ea01 100644
--- a/lib/CodeGen/InlineSpiller.cpp
+++ b/lib/CodeGen/InlineSpiller.cpp
@@ -435,6 +435,8 @@ bool InlineSpiller::hoistSpill(LiveInterval &SpillLI, MachineInstr *CopyMI) {
LiveInterval &OrigLI = LIS.getInterval(Original);
VNInfo *OrigVNI = OrigLI.getVNInfoAt(Idx);
StackInt.MergeValueInAsValue(OrigLI, OrigVNI, StackInt.getValNumInfo(0));
+ DEBUG(dbgs() << "\tmerged orig valno " << OrigVNI->id << ": "
+ << StackInt << '\n');
// Already spilled everywhere.
if (SVI.AllDefsAreReloads)
@@ -480,6 +482,7 @@ void InlineSpiller::eliminateRedundantSpills(unsigned Reg, VNInfo *VNI) {
// Add all of VNI's live range to StackInt.
LiveInterval &LI = LIS.getInterval(Reg);
StackInt.MergeValueInAsValue(LI, VNI, StackInt.getValNumInfo(0));
+ DEBUG(dbgs() << "Merged to stack int: " << StackInt << '\n');
// Find all spills and copies of VNI.
for (MachineRegisterInfo::use_nodbg_iterator UI = MRI.use_nodbg_begin(Reg);
@@ -874,6 +877,7 @@ void InlineSpiller::spill(LiveRangeEdit &edit) {
for (unsigned i = 0, e = RegsToSpill.size(); i != e; ++i)
stacklvr.MergeRangesInAsValue(LIS.getInterval(RegsToSpill[i]),
stacklvr.getValNumInfo(0));
+ DEBUG(dbgs() << "Merged spilled regs: " << stacklvr << '\n');
// Spill around uses of all RegsToSpill.
for (unsigned i = 0, e = RegsToSpill.size(); i != e; ++i)