diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-19 14:52:05 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-19 14:52:05 +0000 |
commit | 20a327b31fc168ddab1494b0dabf4a170666b7aa (patch) | |
tree | c0c3b968f048a0b3d24dcdbd29787ea8e4af0dde /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 511d2e26dd29ff4ef16d1e39898b6cb10bed44f9 (diff) | |
download | bcm5719-llvm-20a327b31fc168ddab1494b0dabf4a170666b7aa.tar.gz bcm5719-llvm-20a327b31fc168ddab1494b0dabf4a170666b7aa.zip |
Change a few instance variables to be local variables.
llvm-svn: 84503
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index 0f3b33f54d4..2122172ee23 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -34,10 +34,8 @@ STATISTIC(NumSunk, "Number of machine instructions sunk"); namespace { class VISIBILITY_HIDDEN MachineSinking : public MachineFunctionPass { - const TargetMachine *TM; const TargetInstrInfo *TII; const TargetRegisterInfo *TRI; - MachineFunction *CurMF; // Current MachineFunction MachineRegisterInfo *RegInfo; // Machine register information MachineDominatorTree *DT; // Machine dominator tree AliasAnalysis *AA; @@ -92,19 +90,16 @@ bool MachineSinking::AllUsesDominatedByBlock(unsigned Reg, return true; } - - bool MachineSinking::runOnMachineFunction(MachineFunction &MF) { DEBUG(errs() << "******** Machine Sinking ********\n"); - CurMF = &MF; - TM = &CurMF->getTarget(); - TII = TM->getInstrInfo(); - TRI = TM->getRegisterInfo(); - RegInfo = &CurMF->getRegInfo(); + const TargetMachine &TM = MF.getTarget(); + TII = TM.getInstrInfo(); + TRI = TM.getRegisterInfo(); + RegInfo = &MF.getRegInfo(); DT = &getAnalysis<MachineDominatorTree>(); AA = &getAnalysis<AliasAnalysis>(); - AllocatableSet = TRI->getAllocatableSet(*CurMF); + AllocatableSet = TRI->getAllocatableSet(MF); bool EverMadeChange = false; @@ -112,7 +107,7 @@ bool MachineSinking::runOnMachineFunction(MachineFunction &MF) { bool MadeChange = false; // Process all basic blocks. - for (MachineFunction::iterator I = CurMF->begin(), E = CurMF->end(); + for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) MadeChange |= ProcessBlock(*I); |