diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-18 01:11:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-18 01:11:14 +0000 |
commit | aed967cc9ebeaa02220d0652954dcf71dce842f2 (patch) | |
tree | 7ccf11e70b08e07aebb943b4df759b5e8faa7ad8 /lib/CodeGen/RegAllocSimple.cpp | |
parent | b33922351835a3772f8a026baa6109045e26c2ae (diff) | |
download | external_llvm-aed967cc9ebeaa02220d0652954dcf71dce842f2.zip external_llvm-aed967cc9ebeaa02220d0652954dcf71dce842f2.tar.gz external_llvm-aed967cc9ebeaa02220d0652954dcf71dce842f2.tar.bz2 |
Implicit defs/uses list may be empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocSimple.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index 34d4d57..ffb6e97 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/lib/CodeGen/RegAllocSimple.cpp @@ -92,13 +92,13 @@ namespace { void invalidatePhysRegs(const MachineInstr *MI) { unsigned Opcode = MI->getOpcode(); const MachineInstrDescriptor &Desc = TM.getInstrInfo().get(Opcode); - const unsigned *regs = Desc.ImplicitUses; - while (*regs) - RegsUsed.insert(*regs++); + if (const unsigned *regs = Desc.ImplicitUses) + while (*regs) + RegsUsed.insert(*regs++); - regs = Desc.ImplicitDefs; - while (*regs) - RegsUsed.insert(*regs++); + if (const unsigned *regs = Desc.ImplicitDefs) + while (*regs) + RegsUsed.insert(*regs++); } void cleanupAfterFunction() { |