summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-09-19 00:23:35 +0000
committerMatthias Braun <matze@braunis.de>2018-09-19 00:23:35 +0000
commit726e12cf0ce6c926877bd8e19e6afe05e5101eeb (patch)
tree3c51890e89c9edc54677dd95cf3939a1b50b6e8c /llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
parentf6ccde781004295dc031b86ee1f19a367130db70 (diff)
downloadbcm5719-llvm-726e12cf0ce6c926877bd8e19e6afe05e5101eeb.tar.gz
bcm5719-llvm-726e12cf0ce6c926877bd8e19e6afe05e5101eeb.zip
ScheduleDAG: Cleanup dumping code; NFC
- Instead of having both `SUnit::dump(ScheduleDAG*)` and `ScheduleDAG::dumpNode(ScheduleDAG*)`, just keep the latter around. - Add `ScheduleDAG::dump()` and avoid code duplication in several places. Implement it for different ScheduleDAG variants. - Add `ScheduleDAG::dumpNodeName()` in favor of the `SUnit::print()` functions. They were only ever used for debug dumping and putting the function into ScheduleDAG is consistent with the `dumpNode()` change. llvm-svn: 342520
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp b/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
index 74c550ce822..ebfe21bd17d 100644
--- a/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
@@ -215,8 +215,7 @@ void VLIWMachineScheduler::schedule() {
++su) if (SUnits[su].getDepth() > maxD) maxD =
SUnits[su].getDepth();
dbgs() << "Max Depth " << maxD << "\n";);
- LLVM_DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su) SUnits[su]
- .dumpAll(this));
+ LLVM_DEBUG(dump());
initQueues(TopRoots, BotRoots);
@@ -489,7 +488,7 @@ void ConvergingVLIWScheduler::traceCandidate(const char *Label,
else
dbgs() << " ";
dbgs() << "cost(" << Cost << ")\t";
- SU->dump(DAG);
+ DAG->dumpNode(*SU);
}
// Very detailed queue dump, to be used with higher verbosity levels.
@@ -982,7 +981,7 @@ SUnit *ConvergingVLIWScheduler::pickNode(bool &IsTopNode) {
<< " Scheduling instruction in cycle "
<< (IsTopNode ? Top.CurrCycle : Bot.CurrCycle) << " ("
<< reportPackets() << ")\n";
- SU->dump(DAG));
+ DAG->dumpNode(*SU));
return SU;
}
OpenPOWER on IntegriCloud