diff options
| author | Dan Gohman <gohman@apple.com> | 2009-02-11 04:27:20 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-02-11 04:27:20 +0000 |
| commit | dfaf646c34011e1bb917fc20c30cc65c628ee5b7 (patch) | |
| tree | bf35f0d64cfa7efda086fbbf49fb521ace4907a9 /llvm/lib/CodeGen/ScheduleDAG.cpp | |
| parent | 483e510a8313c61feca6220a30429bc9304dd064 (diff) | |
| download | bcm5719-llvm-dfaf646c34011e1bb917fc20c30cc65c628ee5b7.tar.gz bcm5719-llvm-dfaf646c34011e1bb917fc20c30cc65c628ee5b7.zip | |
When scheduling a block in parts, keep track of the overall
instruction index across each part. Instruction indices are used
to make live range queries, and live ranges can extend beyond
scheduling region boundaries.
Refactor the ScheduleDAGSDNodes class some more so that it
doesn't have to worry about this additional information.
llvm-svn: 64288
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ScheduleDAG.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAG.cpp b/llvm/lib/CodeGen/ScheduleDAG.cpp index db7d92218b3..a8452dff272 100644 --- a/llvm/lib/CodeGen/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/ScheduleDAG.cpp @@ -23,7 +23,7 @@ using namespace llvm; ScheduleDAG::ScheduleDAG(MachineFunction &mf) - : DAG(0), BB(0), TM(mf.getTarget()), + : TM(mf.getTarget()), TII(TM.getInstrInfo()), TRI(TM.getRegisterInfo()), TLI(TM.getTargetLowering()), @@ -47,23 +47,18 @@ void ScheduleDAG::dumpSchedule() const { /// Run - perform scheduling. /// -void ScheduleDAG::Run(SelectionDAG *dag, MachineBasicBlock *bb, - MachineBasicBlock::iterator begin, - MachineBasicBlock::iterator end) { - assert((!dag || begin == end) && - "An instruction range was given for SelectionDAG scheduling!"); +void ScheduleDAG::Run(MachineBasicBlock *bb, + MachineBasicBlock::iterator insertPos) { + BB = bb; + InsertPos = insertPos; SUnits.clear(); Sequence.clear(); - DAG = dag; - BB = bb; - Begin = begin; - End = end; EntrySU = SUnit(); ExitSU = SUnit(); Schedule(); - + DOUT << "*** Final schedule ***\n"; DEBUG(dumpSchedule()); DOUT << "\n"; |

