[PATCH] D28488: [CodeGen] Implement the SUnit::print() method

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 15:25:18 PST 2017


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/CodeGen/ScheduleDAG.cpp:313
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-static void dumpSUIdentifier(const ScheduleDAG &DAG, const SUnit &SU) {
-  if (&SU == &DAG.ExitSU)
-    dbgs() << "ExitSU";
-  else if (&SU == &DAG.EntrySU)
-    dbgs() << "EntrySU";
+void SUnit::print(raw_ostream &O, const ScheduleDAG *G) const {
+  if (this == &G->ExitSU)
----------------
Most of the other code uses `OS` and `DAG` as variable names for these.


Repository:
  rL LLVM

https://reviews.llvm.org/D28488





More information about the llvm-commits mailing list