Oops.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 27 Feb 2007 22:10:52 +0000 (22:10 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 27 Feb 2007 22:10:52 +0000 (22:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34698 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/RegisterScavenging.h
lib/CodeGen/RegisterScavenging.cpp

index 65fdaea1047480363c75fdfbdc360c983549f7e9..4a82fc5ef63325bc80852e75909d104bb5690553 100644 (file)
@@ -46,14 +46,13 @@ public:
 
   /// Init - Initialize the states.
   ///
-  void init();
+  void init(MachineBasicBlock *mbb = NULL);
 
   /// Reset - Discard previous states and re-initialize the states given for
   /// the specific basic block.
   void reset(MachineBasicBlock *mbb) {
-    MBB = mbb;
     clear();
-    init();
+    init(mbb);
   }
 
   /// forward / backward - Move the internal MBB iterator and update register
index 0f980a712362f030bcdfd1a0fdfb8340d06084a3..6856511bcee2d421719faac619ba944d3e150ff0 100644 (file)
 #include "llvm/ADT/STLExtras.h"
 using namespace llvm;
 
-void RegScavenger::init() {
+void RegScavenger::init(MachineBasicBlock *mbb) {
+  if (mbb)
+    MBB = mbb;
+
   const MachineFunction &MF = *MBB->getParent();
   const TargetMachine &TM = MF.getTarget();
   const MRegisterInfo *RegInfo = TM.getRegisterInfo();