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 | 47ac0f0c7c39289f5970688154e385be22b7f293 (patch) | |
tree | b5171c709044c112ff2b4c1ebd44d1cd1f5f89f4 /lib/CodeGen/ScheduleDAG.cpp | |
parent | ca70533d3daeda66f6a0f19faf6691c20b34d086 (diff) | |
download | llvm-47ac0f0c7c39289f5970688154e385be22b7f293.tar.gz llvm-47ac0f0c7c39289f5970688154e385be22b7f293.tar.bz2 llvm-47ac0f0c7c39289f5970688154e385be22b7f293.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAG.cpp')
-rw-r--r-- | lib/CodeGen/ScheduleDAG.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/CodeGen/ScheduleDAG.cpp b/lib/CodeGen/ScheduleDAG.cpp index db7d92218b..a8452dff27 100644 --- a/lib/CodeGen/ScheduleDAG.cpp +++ b/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"; |