/// init - Prepare this SelectionDAG to process code in the given
/// MachineFunction.
///
- void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw,
- LLVMContext* C);
+ void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw);
/// clear - Clear state and free memory necessary to make this
/// SelectionDAG ready to process a new block.
}
void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi,
- DwarfWriter *dw, LLVMContext* C) {
+ DwarfWriter *dw) {
MF = &mf;
MMI = mmi;
DW = dw;
- Context = C;
+ Context = mf.getFunction()->getContext();
}
SelectionDAG::~SelectionDAG() {
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
- CurDAG->init(*MF, MMI, DW, Context);
+ CurDAG->init(*MF, MMI, DW);
FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
SDL->init(GFI, *AA);