Skip to content

Commit 8a9a363

Browse files
committed
[MIRCanonicalizerPass] Use MCRegister. NFC
1 parent 6a161cb commit 8a9a363

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/CodeGen/MIRCanonicalizerPass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static bool rescheduleCanonically(unsigned &PseudoIdempotentInstCount,
148148
std::map<unsigned, MachineInstr *> MultiUserLookup;
149149
unsigned UseToBringDefCloserToCount = 0;
150150
std::vector<MachineInstr *> PseudoIdempotentInstructions;
151-
std::vector<unsigned> PhysRegDefs;
151+
std::vector<MCRegister> PhysRegDefs;
152152
for (auto *II : Instructions) {
153153
for (unsigned i = 1; i < II->getNumOperands(); i++) {
154154
MachineOperand &MO = II->getOperand(i);
@@ -186,7 +186,8 @@ static bool rescheduleCanonically(unsigned &PseudoIdempotentInstCount,
186186

187187
if (II->getOperand(i).isReg()) {
188188
if (!II->getOperand(i).getReg().isVirtual())
189-
if (!llvm::is_contained(PhysRegDefs, II->getOperand(i).getReg())) {
189+
if (!llvm::is_contained(PhysRegDefs,
190+
II->getOperand(i).getReg().asMCReg())) {
190191
continue;
191192
}
192193
}

0 commit comments

Comments
 (0)