Avoid relying on the SelectionDAG for initializing the MachineFunction and
authorDan Gohman <gohman@apple.com>
Tue, 11 Nov 2008 21:31:56 +0000 (21:31 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 11 Nov 2008 21:31:56 +0000 (21:31 +0000)
TargetLoweringInfo variables for the scheduler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59082 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

index eb0918ed3310eeff3308e5922b0aa68484042fcb..1f898dd72659f90cb2ef91bf427b5e1b4d81f0ea 100644 (file)
@@ -24,10 +24,10 @@ ScheduleDAG::ScheduleDAG(SelectionDAG &dag, MachineBasicBlock *bb,
                          const TargetMachine &tm)
   : DAG(dag), BB(bb), TM(tm), MRI(BB->getParent()->getRegInfo()) {
   TII = TM.getInstrInfo();
-  MF  = &DAG.getMachineFunction();
+  MF  = BB->getParent();
   TRI = TM.getRegisterInfo();
-  TLI = &DAG.getTargetLoweringInfo();
-  ConstPool = BB->getParent()->getConstantPool();
+  TLI = TM.getTargetLowering();
+  ConstPool = MF->getConstantPool();
 }
 
 /// CheckForPhysRegDependency - Check if the dependency between def and use of