From dfaf646c34011e1bb917fc20c30cc65c628ee5b7 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 11 Feb 2009 04:27:20 +0000 Subject: 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 --- llvm/lib/CodeGen/ScheduleDAG.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp') 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"; -- cgit v1.2.3