[all-commits] [llvm/llvm-project] b3cff3: Utility to dump .dot representation of SelectionDA...

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Wed Jun 3 23:22:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b3cff3c72092e40df12a55535a4d0d10cd1d62ce
      https://github.com/llvm/llvm-project/commit/b3cff3c72092e40df12a55535a4d0d10cd1d62ce
  Author: Madhur Amilkanthwar <Madhur.Amilkanthwar at amd.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/SelectionDAG.h
    M llvm/include/llvm/Support/GraphWriter.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

  Log Message:
  -----------
  Utility to dump .dot representation of SelectionDAG without firing viewer

Summary:
This patch adds support for dumping .dot
representation of SelectionDAG. It is inspired from the fact that,
a developer may want to just dump the graph at
a predictable path with a simple name to compare.
The exisitng utility (i.e. viewGraph) are overkill
for this motive hence this patch adds the requires support
while using the core routines from GraphWriter.

Example usage: DAG.dumpDotGraph("/tmp/graph.dot", "MyGraph")
will create /tmp/graph.dot file when DAG is an
object of SelectionDAG class.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D80711




More information about the All-commits mailing list