[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.h RegAllocLinearScan.cpp
Alkis Evlogimenos
alkis at niobe.cs.uiuc.edu
Mon Feb 23 17:48:01 PST 2004
Changes in directory llvm/lib/CodeGen:
VirtRegMap.h updated: 1.1 -> 1.2
RegAllocLinearScan.cpp updated: 1.62 -> 1.63
---
Log message:
Remove '4Virt' from member function names as it is obvious.
---
Diffs of the changes: (+15 -15)
Index: llvm/lib/CodeGen/VirtRegMap.h
diff -u llvm/lib/CodeGen/VirtRegMap.h:1.1 llvm/lib/CodeGen/VirtRegMap.h:1.2
--- llvm/lib/CodeGen/VirtRegMap.h:1.1 Mon Feb 23 17:08:11 2004
+++ llvm/lib/CodeGen/VirtRegMap.h Mon Feb 23 17:47:10 2004
@@ -28,7 +28,7 @@
public:
typedef std::vector<unsigned> Virt2PhysMap;
typedef std::vector<int> Virt2StackSlotMap;
-
+
enum {
NO_PHYS_REG = 0,
NO_STACK_SLOT = INT_MAX
@@ -57,7 +57,7 @@
v2ssMap_(mf.getSSARegMap()->getNumVirtualRegs(), NO_STACK_SLOT) {
}
- unsigned getPhys4Virt(unsigned virtReg) const {
+ unsigned getPhys(unsigned virtReg) const {
assert(MRegisterInfo::isVirtualRegister(virtReg));
return v2pMap_[toIndex(virtReg)];
}
@@ -78,7 +78,7 @@
v2pMap_[toIndex(virtReg)] = NO_PHYS_REG;
}
- int getStackSlot4Virt(unsigned virtReg) const {
+ int getStackSlot(unsigned virtReg) const {
assert(MRegisterInfo::isVirtualRegister(virtReg));
return v2ssMap_[toIndex(virtReg)];
}
Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.62 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.63
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.62 Mon Feb 23 17:08:11 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Mon Feb 23 17:47:10 2004
@@ -115,7 +115,7 @@
std::cerr << "\t" << **i << " -> ";
unsigned reg = (*i)->reg;
if (MRegisterInfo::isVirtualRegister(reg)) {
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
}
std::cerr << mri_->getName(reg) << '\n';
}
@@ -218,7 +218,7 @@
unsigned reg = (*i)->reg;
DEBUG(std::cerr << "\tinterval " << **i << " expired\n");
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
prt_->delRegUse(reg);
}
@@ -253,7 +253,7 @@
if (op.isRegister() &&
MRegisterInfo::isVirtualRegister(op.getReg())) {
unsigned virtReg = op.getReg();
- unsigned physReg = vrm_->getPhys4Virt(virtReg);
+ unsigned physReg = vrm_->getPhys(virtReg);
DEBUG(std::cerr << "\t[reg" << virtReg
<< " -> " << mri_->getName(physReg) << ']');
mii->SetMachineOperandReg(i, physReg);
@@ -306,7 +306,7 @@
if ((*i)->expiredAt(cur->start())) {
DEBUG(std::cerr << "\t\tinterval " << **i << " expired\n");
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
prt_->delRegUse(reg);
// remove from active
i = active_.erase(i);
@@ -315,7 +315,7 @@
else if (!(*i)->liveAt(cur->start())) {
DEBUG(std::cerr << "\t\tinterval " << **i << " inactive\n");
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
prt_->delRegUse(reg);
// add to inactive
inactive_.push_back(*i);
@@ -344,7 +344,7 @@
else if ((*i)->liveAt(cur->start())) {
DEBUG(std::cerr << "\t\tinterval " << **i << " active\n");
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
prt_->addRegUse(reg);
// add to active
active_.push_back(*i);
@@ -377,7 +377,7 @@
i != e; ++i) {
unsigned reg = (*i)->reg;
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
updateSpillWeights(reg, (*i)->weight);
}
@@ -388,7 +388,7 @@
if (cur->overlaps(**i)) {
unsigned reg = (*i)->reg;
if (MRegisterInfo::isVirtualRegister(reg))
- reg = vrm_->getPhys4Virt(reg);
+ reg = vrm_->getPhys(reg);
prt_->addRegUse(reg);
updateSpillWeights(reg, (*i)->weight);
}
@@ -478,7 +478,7 @@
for (IntervalPtrs::iterator i = active_.begin(); i != active_.end(); ++i) {
unsigned reg = (*i)->reg;
if (MRegisterInfo::isVirtualRegister(reg) &&
- toSpill[vrm_->getPhys4Virt(reg)] &&
+ toSpill[vrm_->getPhys(reg)] &&
cur->overlaps(**i)) {
DEBUG(std::cerr << "\t\t\tspilling(a): " << **i << '\n');
earliestStart = std::min(earliestStart, (*i)->start());
@@ -491,7 +491,7 @@
i != inactive_.end(); ++i) {
unsigned reg = (*i)->reg;
if (MRegisterInfo::isVirtualRegister(reg) &&
- toSpill[vrm_->getPhys4Virt(reg)] &&
+ toSpill[vrm_->getPhys(reg)] &&
cur->overlaps(**i)) {
DEBUG(std::cerr << "\t\t\tspilling(i): " << **i << '\n');
earliestStart = std::min(earliestStart, (*i)->start());
@@ -519,7 +519,7 @@
prt_->delRegUse(i->reg);
}
else {
- prt_->delRegUse(vrm_->getPhys4Virt(i->reg));
+ prt_->delRegUse(vrm_->getPhys(i->reg));
vrm_->clearVirtReg(i->reg);
if (i->spilled()) {
if (!i->empty()) {
@@ -575,7 +575,7 @@
if (MRegisterInfo::isPhysicalRegister((*i)->reg))
prt_->addRegUse((*i)->reg);
else
- prt_->addRegUse(vrm_->getPhys4Virt((*i)->reg));
+ prt_->addRegUse(vrm_->getPhys((*i)->reg));
}
}
}
More information about the llvm-commits
mailing list