diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-07 21:23:42 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-07 21:23:42 +0000 |
commit | d8f9f342307b1351a05c081cd5c7fe92678d3c1f (patch) | |
tree | 1810d1b951a391cd6d1e45d6df1ace8482555de3 /lib/CodeGen/ExecutionDepsFix.cpp | |
parent | cd7dcad82a30363132d2dbabb45d60f1d2164a92 (diff) |
MBB doesn't need to be a class member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r-- | lib/CodeGen/ExecutionDepsFix.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/ExecutionDepsFix.cpp b/lib/CodeGen/ExecutionDepsFix.cpp index 3786d57521..7f04224720 100644 --- a/lib/CodeGen/ExecutionDepsFix.cpp +++ b/lib/CodeGen/ExecutionDepsFix.cpp @@ -111,7 +111,6 @@ class ExeDepsFix : public MachineFunctionPass { MachineFunction *MF; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; - MachineBasicBlock *MBB; std::vector<int> AliasMap; const unsigned NumRegs; DomainValue **LiveRegs; @@ -149,7 +148,7 @@ private: void Collapse(DomainValue *dv, unsigned domain); bool Merge(DomainValue *A, DomainValue *B); - void enterBasicBlock(); + void enterBasicBlock(MachineBasicBlock*); void visitGenericInstr(MachineInstr*); void visitSoftInstr(MachineInstr*, unsigned mask); void visitHardInstr(MachineInstr*, unsigned domain); @@ -271,7 +270,7 @@ bool ExeDepsFix::Merge(DomainValue *A, DomainValue *B) { return true; } -void ExeDepsFix::enterBasicBlock() { +void ExeDepsFix::enterBasicBlock(MachineBasicBlock *MBB) { // Try to coalesce live-out registers from predecessors. for (MachineBasicBlock::livein_iterator i = MBB->livein_begin(), e = MBB->livein_end(); i != e; ++i) { @@ -451,7 +450,6 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) { MF = &mf; TII = MF->getTarget().getInstrInfo(); TRI = MF->getTarget().getRegisterInfo(); - MBB = 0; LiveRegs = 0; Distance = 0; assert(NumRegs == RC->getNumRegs() && "Bad regclass"); @@ -482,8 +480,8 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) { for (df_ext_iterator<MachineBasicBlock*, SmallPtrSet<MachineBasicBlock*, 16> > DFI = df_ext_begin(Entry, Visited), DFE = df_ext_end(Entry, Visited); DFI != DFE; ++DFI) { - MBB = *DFI; - enterBasicBlock(); + MachineBasicBlock *MBB = *DFI; + enterBasicBlock(MBB); for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ++I) { MachineInstr *mi = I; |