[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
Wed Jan 25 11:21:02 PST 2017
davidxl created this revision.
There is currently no way to view CFG graphically with layout decision after MBP pass. Developers currently rely on debug text dump to debug layout related bugs.
This patch adds the capability to dump/view cfg dump file after MBP pass. It enhances the existing MBFI graph dumping with an optional functionality to display the layout order of an machine basic block. The order of a basic block is displayed as a sequence number encoded in brackets [] after the block name string. The graph will also show branch probabilities and frequencies/count information.
The option is:
-mllvm -view-block-layout-with-bfi=[integer|fraction|count]
To filter, do -mllvm -view-bfi-func-name=<name>
Example for CodeGen/PowerPC/tail-dup-layout.ll
1. block layout with tailduplication enabled:
https://reviews.llvm.org/F3024165
2. block layout with tail-dup disabled:
https://reviews.llvm.org/F3024166
https://reviews.llvm.org/D29141
Files:
include/llvm/Analysis/BlockFrequencyInfoImpl.h
include/llvm/CodeGen/MachineBlockFrequencyInfo.h
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/BranchFolding.h
lib/CodeGen/MachineBlockFrequencyInfo.cpp
lib/CodeGen/MachineBlockPlacement.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29141.85785.patch
Type: text/x-patch
Size: 7388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170125/cc143348/attachment.bin>
More information about the llvm-commits
mailing list