[llvm-commits] [llvm] r127959 - in /llvm/trunk/lib/CodeGen: InlineSpiller.cpp RegAllocGreedy.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sat Mar 19 16:02:47 PDT 2011
Author: stoklund
Date: Sat Mar 19 18:02:47 2011
New Revision: 127959
URL: http://llvm.org/viewvc/llvm-project?rev=127959&view=rev
Log:
Add debug output.
Modified:
llvm/trunk/lib/CodeGen/InlineSpiller.cpp
llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=127959&r1=127958&r2=127959&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Sat Mar 19 18:02:47 2011
@@ -435,6 +435,8 @@
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 @@
// 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 @@
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)
Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=127959&r1=127958&r2=127959&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Sat Mar 19 18:02:47 2011
@@ -1265,6 +1265,7 @@
// Wait until the second time, when all smaller ranges have been allocated.
// This gives a better picture of the interference to split around.
if (Stage == RS_Original) {
+ DEBUG(dbgs() << "wait for second round\n");
NewVRegs.push_back(&VirtReg);
return 0;
}
More information about the llvm-commits
mailing list