diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-27 22:10:52 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-27 22:10:52 +0000 |
commit | 8cab162e03d7ae0638a3ab51e92ac228abe17d55 (patch) | |
tree | b27a2f66aeb26dfc3616488b34fdf0e6f9a7c600 | |
parent | 50d456539dea5e61d7a1592a78f1861fb35b0063 (diff) |
Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34698 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/RegisterScavenging.h | 5 | ||||
-rw-r--r-- | lib/CodeGen/RegisterScavenging.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index 65fdaea104..4a82fc5ef6 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -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 diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index 0f980a7123..6856511bce 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -25,7 +25,10 @@ #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(); |