diff options
author | Dan Gohman <gohman@apple.com> | 2008-11-11 17:50:47 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-11-11 17:50:47 +0000 |
commit | 9b75b373756288cd39489da7994207f50b31ee40 (patch) | |
tree | 387ccbbdf3cb03922c6f1e5aa6b38a01bd6918e7 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 86d77337fcd270bd12ca32674ebab9c8379d56e6 (diff) |
Change the scheduler accessor methods to accept an explicit TargetMachine
argument instead of taking the SelectionDAG's TargetMachine. This is
needed for some upcoming scheduler changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7702b3d5e9..3114d1b9bb 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -133,16 +133,17 @@ namespace llvm { /// for the target. ScheduleDAG* createDefaultScheduler(SelectionDAGISel *IS, SelectionDAG *DAG, + const TargetMachine *TM, MachineBasicBlock *BB, bool Fast) { TargetLowering &TLI = IS->getTargetLowering(); if (TLI.getSchedulingPreference() == TargetLowering::SchedulingForLatency) { - return createTDListDAGScheduler(IS, DAG, BB, Fast); + return createTDListDAGScheduler(IS, DAG, TM, BB, Fast); } else { assert(TLI.getSchedulingPreference() == TargetLowering::SchedulingForRegPressure && "Unknown sched type!"); - return createBURRListDAGScheduler(IS, DAG, BB, Fast); + return createBURRListDAGScheduler(IS, DAG, TM, BB, Fast); } } } @@ -1053,7 +1054,8 @@ ScheduleDAG *SelectionDAGISel::Schedule() { RegisterScheduler::setDefault(Ctor); } - ScheduleDAG *Scheduler = Ctor(this, CurDAG, BB, Fast); + TargetMachine &TM = getTargetLowering().getTargetMachine(); + ScheduleDAG *Scheduler = Ctor(this, CurDAG, &TM, BB, Fast); Scheduler->Run(); return Scheduler; |