Have the selection dag grab TargetLowering off of the subtarget
[oota-llvm.git] / lib / CodeGen / SelectionDAG / SelectionDAG.cpp
index 25532ec1ba77ac5bb5e5dd0d19f646548d9de76e..5c89665ce665c2b11a90320acf43b5631b1fc721 100644 (file)
@@ -915,9 +915,9 @@ SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
   DbgInfo = new SDDbgInfo();
 }
 
-void SelectionDAG::init(MachineFunction &mf, const TargetLowering *tli) {
+void SelectionDAG::init(MachineFunction &mf) {
   MF = &mf;
-  TLI = tli;
+  TLI = getSubtarget().getTargetLowering();
   TSI = getSubtarget().getSelectionDAGInfo();
   Context = &mf.getFunction()->getContext();
 }