[llvm-commits] [llvm] r84503 - /llvm/trunk/lib/CodeGen/MachineSink.cpp
Dan Gohman
gohman at apple.com
Mon Oct 19 07:52:05 PDT 2009
Author: djg
Date: Mon Oct 19 09:52:05 2009
New Revision: 84503
URL: http://llvm.org/viewvc/llvm-project?rev=84503&view=rev
Log:
Change a few instance variables to be local variables.
Modified:
llvm/trunk/lib/CodeGen/MachineSink.cpp
Modified: llvm/trunk/lib/CodeGen/MachineSink.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineSink.cpp?rev=84503&r1=84502&r2=84503&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineSink.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineSink.cpp Mon Oct 19 09:52:05 2009
@@ -34,10 +34,8 @@
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 @@
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 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);
More information about the llvm-commits
mailing list