As Chris pointed out, we don't actually need to pass the context around here.
authorOwen Anderson <resistor@mac.com>
Thu, 9 Jul 2009 18:44:09 +0000 (18:44 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 9 Jul 2009 18:44:09 +0000 (18:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75161 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index f90a4609ced8ae66ee9c3e16c940581409480c5b..dc93f12df12c88e1f4a2f05ff6dfa176d3fd5f72 100644 (file)
@@ -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.
index 260996fac7a5ec535246dc14abb675fd6d064c24..2d154942c7548311742a57472d680e09a9fea9fc 100644 (file)
@@ -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() {
index d815523d8253a578cb651fa4371648a2b83d0ec8..485545c63a533e19f789a486f4c862a5c866fc0a 100644 (file)
@@ -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);