[PATCH] D29141: Support of CFG dot dump with layout annotation after MBP pass
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 16:23:46 PST 2017
davidxl marked an inline comment as done.
davidxl added inline comments.
================
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1301
+ else
+ OS << Node->getName().str() << " : ";
switch (GType) {
----------------
vsk wrote:
> '.str()' shouldn't be needed in either branch.
ok
================
Comment at: lib/CodeGen/MachineBlockFrequencyInfo.cpp:117
+ if (!isSimple()) {
+ const MachineFunction *F = Node->getParent();
+ if (!CurFunc || F != CurFunc) {
----------------
vsk wrote:
> 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?
It is tempting but the requires invoking MF.RenumberBlocks() which has side effects. A debug option should not change optimizer behavior.
https://reviews.llvm.org/D29141
More information about the llvm-commits
mailing list