Fix problems linking against the reoptimizer; _llvm_regAllocState must have
[oota-llvm.git] / lib / CodeGen / RegAllocSimple.cpp
index 57d678b02f0711a0988298055022f31f8002665d..a210790b8dd77f0313d02be7fae97e4c9ac01c23 100644 (file)
@@ -1,4 +1,11 @@
 //===-- RegAllocSimple.cpp - A simple generic register allocator ----------===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This file implements a simple register allocator. *Very* simple: It immediate
 // spills every value right after it is computed, and it reloads all used
@@ -153,13 +160,13 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) {
     // are used by the instruction (including implicit uses)
     unsigned Opcode = MI->getOpcode();
     const TargetInstrDescriptor &Desc = TM->getInstrInfo().get(Opcode);
-    if (const unsigned *Regs = Desc.ImplicitUses)
-      while (*Regs)
-       RegsUsed[*Regs++] = true;
+    const unsigned *Regs = Desc.ImplicitUses;
+    while (*Regs)
+      RegsUsed[*Regs++] = true;
     
-    if (const unsigned *Regs = Desc.ImplicitDefs)
-      while (*Regs)
-       RegsUsed[*Regs++] = true;
+    Regs = Desc.ImplicitDefs;
+    while (*Regs)
+      RegsUsed[*Regs++] = true;
     
     // Loop over uses, move from memory into registers
     for (int i = MI->getNumOperands() - 1; i >= 0; --i) {