aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-07-21 21:15:20 +0000
committerJim Laskey <jlaskey@mac.com>2006-07-21 21:15:20 +0000
commitcd4317efcf334be10d9a98008a1445d6e12a7712 (patch)
tree82f4e6381dbe6669926e797094654c0f430ed18c /lib/CodeGen/VirtRegMap.cpp
parent60f09928a0d22d5927ff0a40fe9163cf1ba1014a (diff)
downloadexternal_llvm-cd4317efcf334be10d9a98008a1445d6e12a7712.zip
external_llvm-cd4317efcf334be10d9a98008a1445d6e12a7712.tar.gz
external_llvm-cd4317efcf334be10d9a98008a1445d6e12a7712.tar.bz2
Eliminate data relocations by using NULL instead of global empty list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 86fef3e..bc56945 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -671,10 +671,12 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
// Loop over all of the implicit defs, clearing them from our available
// sets.
- for (const unsigned *ImpDef = TII->getImplicitDefs(MI.getOpcode());
- *ImpDef; ++ImpDef) {
- PhysRegsUsed[*ImpDef] = true;
- Spills.ClobberPhysReg(*ImpDef);
+ const unsigned *ImpDef = TII->getImplicitDefs(MI.getOpcode());
+ if (ImpDef) {
+ for ( ; *ImpDef; ++ImpDef) {
+ PhysRegsUsed[*ImpDef] = true;
+ Spills.ClobberPhysReg(*ImpDef);
+ }
}
DEBUG(std::cerr << '\t' << MI);