diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-14 23:46:21 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-14 23:46:21 +0000 |
commit | 20d25a7f40889c5312ecf80ba53dd3eb18cf9a11 (patch) | |
tree | 8c57fcf0bcedd01d6e80df48669ea64827017021 /llvm/lib | |
parent | 9bd64f90e2429ee631075af38f382cb9244f8818 (diff) | |
download | bcm5719-llvm-20d25a7f40889c5312ecf80ba53dd3eb18cf9a11.tar.gz bcm5719-llvm-20d25a7f40889c5312ecf80ba53dd3eb18cf9a11.zip |
Dump live intervals in numerical order.
The old DenseMap hashed order was very confusing.
llvm-svn: 150527
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 0e64ec90118..32f4c5b3ff6 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -107,10 +107,21 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { /// print - Implement the dump method. void LiveIntervals::print(raw_ostream &OS, const Module* ) const { OS << "********** INTERVALS **********\n"; - for (const_iterator I = begin(), E = end(); I != E; ++I) { - I->second->print(OS, tri_); - OS << "\n"; - } + + // Dump the physregs. + for (unsigned Reg = 1, RegE = tri_->getNumRegs(); Reg != RegE; ++Reg) + if (const LiveInterval *LI = r2iMap_.lookup(Reg)) { + LI->print(OS, tri_); + OS << '\n'; + } + + // Dump the virtregs. + for (unsigned Reg = 0, RegE = mri_->getNumVirtRegs(); Reg != RegE; ++Reg) + if (const LiveInterval *LI = + r2iMap_.lookup(TargetRegisterInfo::index2VirtReg(Reg))) { + LI->print(OS, tri_); + OS << '\n'; + } printInstrs(OS); } |