[PATCH] D29141: Support of CFG dot dump with layout annotation after MBP pass

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 15:46:24 PST 2017


vsk added inline comments.


================
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1301
+    else
+      OS << Node->getName().str() << " : ";
     switch (GType) {
----------------
'.str()' shouldn't be needed in either branch.


================
Comment at: lib/CodeGen/MachineBlockFrequencyInfo.cpp:117
+    if (!isSimple()) {
+      const MachineFunction *F = Node->getParent();
+      if (!CurFunc || F != CurFunc) {
----------------
Can we just use `Node->getNumber()` here? IIUC it's available so long as the MBB is in a MachineFunc, which we appear to be assuming?


https://reviews.llvm.org/D29141





More information about the llvm-commits mailing list