Implicit defs/uses list may be empty.

llvm-svn: 5103
This commit is contained in:
Chris Lattner 2002-12-18 01:11:14 +00:00
parent b1c74bb421
commit bb2e7ec2b1

View File

@ -92,13 +92,13 @@ namespace {
void invalidatePhysRegs(const MachineInstr *MI) { void invalidatePhysRegs(const MachineInstr *MI) {
unsigned Opcode = MI->getOpcode(); unsigned Opcode = MI->getOpcode();
const MachineInstrDescriptor &Desc = TM.getInstrInfo().get(Opcode); const MachineInstrDescriptor &Desc = TM.getInstrInfo().get(Opcode);
const unsigned *regs = Desc.ImplicitUses; if (const unsigned *regs = Desc.ImplicitUses)
while (*regs) while (*regs)
RegsUsed.insert(*regs++); RegsUsed.insert(*regs++);
regs = Desc.ImplicitDefs; if (const unsigned *regs = Desc.ImplicitDefs)
while (*regs) while (*regs)
RegsUsed.insert(*regs++); RegsUsed.insert(*regs++);
} }
void cleanupAfterFunction() { void cleanupAfterFunction() {