diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-26 04:35:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 04:35:26 +0000 |
commit | b84822fb7b64977c16e97b870891da1d6c9736fe (patch) | |
tree | fb43db9cabf515f2751c5c0aeb5e362a63fbc017 /lib/CodeGen/MachineFunction.cpp | |
parent | b8da4ac698dbb219e093b3159e2b5519063b011c (diff) |
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
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index cf3b8f056a..faffe145e1 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -70,9 +70,9 @@ FunctionPass *llvm::createMachineFunctionPrinterPass(raw_ostream &OS, return new Printer(OS, Banner); } -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// // MachineFunction implementation -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// // Out of line virtual method. MachineFunctionInfo::~MachineFunctionInfo() {} @@ -81,8 +81,8 @@ void ilist_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) { MBB->getParent()->DeleteMachineBasicBlock(MBB); } -MachineFunction::MachineFunction(Function *F, - const TargetMachine &TM) +MachineFunction::MachineFunction(Function *F, const TargetMachine &TM, + unsigned FunctionNum) : Fn(F), Target(TM) { if (TM.getRegisterInfo()) RegInfo = new (Allocator.Allocate<MachineRegisterInfo>()) @@ -95,7 +95,7 @@ MachineFunction::MachineFunction(Function *F, ConstantPool = new (Allocator.Allocate<MachineConstantPool>()) MachineConstantPool(TM.getTargetData()); Alignment = TM.getTargetLowering()->getFunctionAlignment(F); - + FunctionNumber = FunctionNum; JumpTableInfo = 0; } |