diff options
author | Christudasan Devadasan <Christudasan.Devadasan@amd.com> | 2022-09-22 10:49:46 +0530 |
---|---|---|
committer | Christudasan Devadasan <Christudasan.Devadasan@amd.com> | 2022-09-22 12:48:33 +0530 |
commit | 32a8260ccc8bc87134df6417c6deb0f4172bc4bf (patch) | |
tree | 97a1cdd732d250cbd5898315f001add2d646fd68 /llvm/lib/CodeGen/CMakeLists.txt | |
parent | e500f8f8a826e5dd7aa95b4dc98fedc7e824b81b (diff) | |
download | llvm-32a8260ccc8bc87134df6417c6deb0f4172bc4bf.zip llvm-32a8260ccc8bc87134df6417c6deb0f4172bc4bf.tar.gz llvm-32a8260ccc8bc87134df6417c6deb0f4172bc4bf.tar.bz2 |
-dot-machine-cfg for printing MachineFunction to a dot file
This pass allows a user to dump a MIR function to a dot file
and view it as a graph. It is targeted to provide a similar
functionality as -dot-cfg pass on LLVM-IR. As of now the pass
also support below flags:
-dot-mcfg-only [optional][won't print instructions in the
graph just block name]
-mcfg-dot-filename-prefix [optional][prefix to add to output dot file]
-mcfg-func-name [optional] [specify function name or it's
substring, handy if mir file contains multiple functions and
you need to see graph of just one]
More flags and details can be introduced as per the requirements
in future. This pass is inspired from -dot-cfg IR pass and APIs
are written in almost identical format.
Patch by Yashwant Singh <Yashwant.Singh@amd.com> (yassingh)
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D133709
Diffstat (limited to 'llvm/lib/CodeGen/CMakeLists.txt')
-rw-r--r-- | llvm/lib/CodeGen/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt index 5ed42c7..604f2c6 100644 --- a/llvm/lib/CodeGen/CMakeLists.txt +++ b/llvm/lib/CodeGen/CMakeLists.txt @@ -101,6 +101,7 @@ add_llvm_component_library(LLVMCodeGen MachineBlockFrequencyInfo.cpp MachineBlockPlacement.cpp MachineBranchProbabilityInfo.cpp + MachineCFGPrinter.cpp MachineCombiner.cpp MachineCopyPropagation.cpp MachineCSE.cpp |