diff options
author | Andrew Trick <atrick@apple.com> | 2012-03-07 05:21:40 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-03-07 05:21:40 +0000 |
commit | 73ba69b6843f7f23345b1e8745cb328952cae0d8 (patch) | |
tree | 5064cee67f2b8cd8e8b57fbf509db240eb1db9ba /lib/CodeGen/PostRASchedulerList.cpp | |
parent | 4c727204271067f3dbf50bd23098b2df8e1cc47a (diff) |
misched preparation: modularize schedule printing.
ScheduleDAG will not refer to the scheduled instruction sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PostRASchedulerList.cpp')
-rw-r--r-- | lib/CodeGen/PostRASchedulerList.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp index 4c768acb54..72ae6febb1 100644 --- a/lib/CodeGen/PostRASchedulerList.cpp +++ b/lib/CodeGen/PostRASchedulerList.cpp @@ -170,6 +170,8 @@ namespace { // adjustments may be made to the instruction if necessary. Return // true if the operand has been deleted, false if not. bool ToggleKillFlag(MachineInstr *MI, MachineOperand &MO); + + void dumpSchedule() const; }; } @@ -202,6 +204,16 @@ SchedulePostRATDList::~SchedulePostRATDList() { delete AntiDepBreak; } +/// dumpSchedule - dump the scheduled Sequence. +void SchedulePostRATDList::dumpSchedule() const { + for (unsigned i = 0, e = Sequence.size(); i != e; i++) { + if (SUnit *SU = Sequence[i]) + SU->dump(this); + else + dbgs() << "**** NOOP ****\n"; + } +} + bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) { TII = Fn.getTarget().getInstrInfo(); MachineLoopInfo &MLI = getAnalysis<MachineLoopInfo>(); @@ -343,6 +355,12 @@ void SchedulePostRATDList::Schedule() { AvailableQueue.initNodes(SUnits); ListScheduleTopDown(); AvailableQueue.releaseState(); + + DEBUG({ + dbgs() << "*** Final schedule ***\n"; + dumpSchedule(); + dbgs() << '\n'; + }); } /// Observe - Update liveness information to account for the current |