// Not a copy.
SmallVector<unsigned, 2> Defs;
+ bool HasRegMask = false;
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI->getOperand(i);
+ if (MO.isRegMask())
+ HasRegMask = true;
if (!MO.isReg())
continue;
unsigned Reg = MO.getReg();
}
}
+ // The instruction has a register mask operand which means that it clobbers
+ // a large set of registers. It is possible to use the register mask to
+ // prune the available copies, but treat it like a basic block boundary for
+ // now.
+ if (HasRegMask) {
+ // FIXME: We could possibly erase some MaybeDeadCopies if their registers
+ // are clobbered by the mask.
+ MaybeDeadCopies.clear();
+ AvailCopyMap.clear();
+ CopyMap.clear();
+ SrcMap.clear();
+ continue;
+ }
+
for (unsigned i = 0, e = Defs.size(); i != e; ++i) {
unsigned Reg = Defs[i];