make MachineFunction keep track of its ID and make

MachineFunctionAnalysis dole them out, instead of having
AsmPrinter do both.  Have the AsmPrinter::SetupMachineFunction
method set the 'AsmPrinter::MF' variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-26 04:35:26 +00:00
parent b8da4ac698
commit b84822fb7b
7 changed files with 28 additions and 25 deletions

View File

@@ -28,7 +28,7 @@ private:
const TargetMachine &TM;
CodeGenOpt::Level OptLevel;
MachineFunction *MF;
unsigned NextFnNum;
public:
static char ID;
explicit MachineFunctionAnalysis(const TargetMachine &tm,
@@ -39,6 +39,7 @@ public:
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
private:
virtual bool doInitialization(Module &) { NextFnNum = 1; return false; }
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
virtual void getAnalysisUsage(AnalysisUsage &AU) const;