mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Rename virtRegMap to avoid confusion with the VirtRegMap that it isn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5daec2215b
commit
6ed4c6af97
@ -308,7 +308,7 @@ class LDVImpl {
|
|||||||
|
|
||||||
/// Map virtual register to eq class leader.
|
/// Map virtual register to eq class leader.
|
||||||
typedef DenseMap<unsigned, UserValue*> VRMap;
|
typedef DenseMap<unsigned, UserValue*> VRMap;
|
||||||
VRMap virtRegMap;
|
VRMap virtRegToEqClass;
|
||||||
|
|
||||||
/// Map user variable to eq class leader.
|
/// Map user variable to eq class leader.
|
||||||
typedef DenseMap<const MDNode *, UserValue*> UVMap;
|
typedef DenseMap<const MDNode *, UserValue*> UVMap;
|
||||||
@ -347,7 +347,7 @@ public:
|
|||||||
void clear() {
|
void clear() {
|
||||||
DeleteContainerPointers(userValues);
|
DeleteContainerPointers(userValues);
|
||||||
userValues.clear();
|
userValues.clear();
|
||||||
virtRegMap.clear();
|
virtRegToEqClass.clear();
|
||||||
userVarMap.clear();
|
userVarMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,12 +456,12 @@ UserValue *LDVImpl::getUserValue(const MDNode *Var, unsigned Offset) {
|
|||||||
|
|
||||||
void LDVImpl::mapVirtReg(unsigned VirtReg, UserValue *EC) {
|
void LDVImpl::mapVirtReg(unsigned VirtReg, UserValue *EC) {
|
||||||
assert(TargetRegisterInfo::isVirtualRegister(VirtReg) && "Only map VirtRegs");
|
assert(TargetRegisterInfo::isVirtualRegister(VirtReg) && "Only map VirtRegs");
|
||||||
UserValue *&Leader = virtRegMap[VirtReg];
|
UserValue *&Leader = virtRegToEqClass[VirtReg];
|
||||||
Leader = UserValue::merge(Leader, EC);
|
Leader = UserValue::merge(Leader, EC);
|
||||||
}
|
}
|
||||||
|
|
||||||
UserValue *LDVImpl::lookupVirtReg(unsigned VirtReg) {
|
UserValue *LDVImpl::lookupVirtReg(unsigned VirtReg) {
|
||||||
if (UserValue *UV = virtRegMap.lookup(VirtReg))
|
if (UserValue *UV = virtRegToEqClass.lookup(VirtReg))
|
||||||
return UV->getLeader();
|
return UV->getLeader();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -662,7 +662,7 @@ renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx) {
|
|||||||
|
|
||||||
if (TargetRegisterInfo::isVirtualRegister(NewReg))
|
if (TargetRegisterInfo::isVirtualRegister(NewReg))
|
||||||
mapVirtReg(NewReg, UV);
|
mapVirtReg(NewReg, UV);
|
||||||
virtRegMap.erase(OldReg);
|
virtRegToEqClass.erase(OldReg);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
UV->renameRegister(OldReg, NewReg, SubIdx, TRI);
|
UV->renameRegister(OldReg, NewReg, SubIdx, TRI);
|
||||||
|
Loading…
Reference in New Issue
Block a user