summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/R600MachineScheduler.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/AMDGPU/R600MachineScheduler.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/AMDGPU/R600MachineScheduler.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp b/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp
index a1429a2ac50..478a473a51b 100644
--- a/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp
+++ b/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp
@@ -127,13 +127,13 @@ SUnit* R600SchedStrategy::pickNode(bool &IsTopNode) {
LLVM_DEBUG(if (SU) {
dbgs() << " ** Pick node **\n";
- SU->dump(DAG);
+ DAG->dumpNode(*SU);
} else {
dbgs() << "NO NODE \n";
for (unsigned i = 0; i < DAG->SUnits.size(); i++) {
const SUnit &S = DAG->SUnits[i];
if (!S.isScheduled)
- S.dump(DAG);
+ DAG->dumpNode(S);
}
});
@@ -188,11 +188,11 @@ isPhysicalRegCopy(MachineInstr *MI) {
}
void R600SchedStrategy::releaseTopNode(SUnit *SU) {
- LLVM_DEBUG(dbgs() << "Top Releasing "; SU->dump(DAG););
+ LLVM_DEBUG(dbgs() << "Top Releasing "; DAG->dumpNode(*SU));
}
void R600SchedStrategy::releaseBottomNode(SUnit *SU) {
- LLVM_DEBUG(dbgs() << "Bottom Releasing "; SU->dump(DAG););
+ LLVM_DEBUG(dbgs() << "Bottom Releasing "; DAG->dumpNode(*SU));
if (isPhysicalRegCopy(SU->getInstr())) {
PhysicalRegCopy.push_back(SU);
return;
OpenPOWER on IntegriCloud