[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Jan 16 14:30:01 PST 2004
Changes in directory llvm/lib/CodeGen:
RegAllocLinearScan.cpp updated: 1.29 -> 1.30
---
Log message:
Handle printing of intervals that are not assign to any physical
register yet.
---
Diffs of the changes: (+7 -6)
Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.29 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.30
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.29 Fri Jan 16 14:17:05 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Fri Jan 16 14:29:42 2004
@@ -161,21 +161,22 @@
}
std::cerr << '\n';
}
+
void printIntervals(const char* const str,
RA::IntervalPtrs::const_iterator i,
RA::IntervalPtrs::const_iterator e) const {
if (str) std::cerr << str << " intervals:\n";
for (; i != e; ++i) {
std::cerr << "\t\t" << **i << " -> ";
- if ((*i)->reg < MRegisterInfo::FirstVirtualRegister) {
- std::cerr << mri_->getName((*i)->reg);
+ unsigned reg = (*i)->reg;
+ if (reg >= MRegisterInfo::FirstVirtualRegister) {
+ Virt2PhysMap::const_iterator it = v2pMap_.find(reg);
+ reg = (it == v2pMap_.end() ? 0 : it->second);
}
- else {
- std::cerr << mri_->getName(v2pMap_.find((*i)->reg)->second);
- }
- std::cerr << '\n';
+ std::cerr << mri_->getName((*i)->reg) << '\n';
}
}
+
void printFreeRegs(const char* const str,
const TargetRegisterClass* rc) const {
if (str) std::cerr << str << ':';
More information about the llvm-commits
mailing list