1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-svn: 34698
This commit is contained in:
Evan Cheng 2007-02-27 22:10:52 +00:00
parent 35b160f990
commit 2402ddad92
2 changed files with 6 additions and 4 deletions

View 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

View File

@ -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();