Skip to content

Commit 0a44d3a

Browse files
committed
[CodeGen] Use MCRegister instead of MCPhysReg in VirtRegMap. NFC
The callers of these methods already use MCRegister.
1 parent f8b2794 commit 0a44d3a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/include/llvm/CodeGen/VirtRegMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class VirtRegMap {
9494

9595
/// creates a mapping for the specified virtual register to
9696
/// the specified physical register
97-
void assignVirt2Phys(Register virtReg, MCPhysReg physReg);
97+
void assignVirt2Phys(Register virtReg, MCRegister physReg);
9898

9999
bool isShapeMapEmpty() const { return Virt2ShapeMap.empty(); }
100100

llvm/lib/CodeGen/VirtRegMap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ void VirtRegMap::grow() {
8383
Virt2SplitMap.resize(NumRegs);
8484
}
8585

86-
void VirtRegMap::assignVirt2Phys(Register virtReg, MCPhysReg physReg) {
87-
assert(virtReg.isVirtual() && Register::isPhysicalRegister(physReg));
86+
void VirtRegMap::assignVirt2Phys(Register virtReg, MCRegister physReg) {
87+
assert(virtReg.isVirtual() && physReg.isPhysical());
8888
assert(!Virt2PhysMap[virtReg] &&
8989
"attempt to assign physical register to already mapped "
9090
"virtual register");
@@ -221,7 +221,7 @@ class VirtRegRewriter : public MachineFunctionPass {
221221
bool subRegLiveThrough(const MachineInstr &MI, MCRegister SuperPhysReg) const;
222222
LaneBitmask liveOutUndefPhiLanesForUndefSubregDef(
223223
const LiveInterval &LI, const MachineBasicBlock &MBB, unsigned SubReg,
224-
MCPhysReg PhysReg, const MachineInstr &MI) const;
224+
MCRegister PhysReg, const MachineInstr &MI) const;
225225

226226
public:
227227
static char ID;
@@ -563,7 +563,7 @@ bool VirtRegRewriter::subRegLiveThrough(const MachineInstr &MI,
563563
/// is assigned to \p LI, which is the main range.
564564
LaneBitmask VirtRegRewriter::liveOutUndefPhiLanesForUndefSubregDef(
565565
const LiveInterval &LI, const MachineBasicBlock &MBB, unsigned SubReg,
566-
MCPhysReg PhysReg, const MachineInstr &MI) const {
566+
MCRegister PhysReg, const MachineInstr &MI) const {
567567
LaneBitmask UndefMask = ~TRI->getSubRegIndexLaneMask(SubReg);
568568
LaneBitmask LiveOutUndefLanes;
569569

0 commit comments

Comments
 (0)