My Project
ViewRegionGraph.h
Go to the documentation of this file.
1 //===- ViewRegionGraph.h - View/write graphviz graphs -----------*- C++ -*-===//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Defines interface to produce Graphviz outputs of MLIR Regions.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_TRANSFORMS_VIEWFUNCTIONGRAPH_H_
14 #define MLIR_TRANSFORMS_VIEWFUNCTIONGRAPH_H_
15 
16 #include "mlir/Support/LLVM.h"
17 #include "llvm/Support/GraphWriter.h"
18 #include "llvm/Support/raw_ostream.h"
19 
20 namespace mlir {
21 class FuncOp;
22 template <typename T> class OpPassBase;
23 class Region;
24 
27 void viewGraph(Region &region, const Twine &name, bool shortNames = false,
28  const Twine &title = "",
29  llvm::GraphProgram::Name program = llvm::GraphProgram::DOT);
30 
31 raw_ostream &writeGraph(raw_ostream &os, Region &region,
32  bool shortNames = false, const Twine &title = "");
33 
35 std::unique_ptr<mlir::OpPassBase<mlir::FuncOp>>
36 createPrintCFGGraphPass(raw_ostream &os = llvm::errs(), bool shortNames = false,
37  const Twine &title = "");
38 
39 } // end namespace mlir
40 
41 #endif // MLIR_TRANSFORMS_VIEWFUNCTIONGRAPH_H_
Definition: InferTypeOpInterface.cpp:20
raw_ostream & writeGraph(raw_ostream &os, Block &block, bool shortNames=false, const Twine &title="")
Definition: ViewOpGraph.cpp:154
std::unique_ptr< mlir::OpPassBase< mlir::FuncOp > > createPrintCFGGraphPass(raw_ostream &os=llvm::errs(), bool shortNames=false, const Twine &title="")
Creates a pass to print CFG graphs.
Definition: ViewRegionGraph.cpp:79
void viewGraph(Block &block, const Twine &name, bool shortNames=false, const Twine &title="", llvm::GraphProgram::Name program=llvm::GraphProgram::DOT)
Definition: ViewOpGraph.cpp:149