As Chris pointed out, we don't actually need to pass the context around here.

llvm-svn: 75161
This commit is contained in:
Owen Anderson 2009-07-09 18:44:09 +00:00
parent 1fc5ed8460
commit 03965f5212
3 changed files with 4 additions and 5 deletions
include/llvm/CodeGen
lib/CodeGen/SelectionDAG

@ -126,8 +126,7 @@ public:
/// 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.

@ -811,11 +811,11 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
}
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() {

@ -319,7 +319,7 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
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);