MLIR 22.0.0git
ViewOpGraph.cpp File Reference
#include "mlir/Transforms/ViewOpGraph.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Operation.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Support/IndentedOstream.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/GraphWriter.h"
#include <map>
#include <optional>
#include <utility>
#include "mlir/Transforms/Passes.h.inc"

Go to the source code of this file.

Classes

class  mlir::impl::ViewOpGraphBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

Macros

#define GEN_PASS_DEF_VIEWOPGRAPH

Typedefs

using AttributeMap = std::map<std::string, std::string>

Functions

static int64_t getLargeAttributeSizeLimit ()
 Return the size limits for eliding large attributes.
static std::string strFromOs (function_ref< void(raw_ostream &)> func)
 Return all values printed onto a stream as a string.
static std::string quoteString (const std::string &str)
 Put quotation marks around a given string.
std::string escapeLabelString (const std::string &str)
 For Graphviz record nodes: " Braces, vertical bars and angle brackets must be escaped with a backslash character if you wish them to appear as a literal character ".
static void llvmViewGraph (Region &region, const Twine &name)
 Generate a CFG for a region and show it in a window.

Variables

static const StringRef kLineStyleControlFlow = "dashed"
static const StringRef kLineStyleDataFlow = "solid"
static const StringRef kShapeNode = "Mrecord"
static const StringRef kShapeNone = "plain"

Macro Definition Documentation

◆ GEN_PASS_DEF_VIEWOPGRAPH

#define GEN_PASS_DEF_VIEWOPGRAPH

Definition at line 24 of file ViewOpGraph.cpp.

Typedef Documentation

◆ AttributeMap

using AttributeMap = std::map<std::string, std::string>

Definition at line 71 of file ViewOpGraph.cpp.

Function Documentation

◆ escapeLabelString()

std::string escapeLabelString ( const std::string & str)

For Graphviz record nodes: " Braces, vertical bars and angle brackets must be escaped with a backslash character if you wish them to appear as a literal character ".

Definition at line 60 of file ViewOpGraph.cpp.

◆ getLargeAttributeSizeLimit()

int64_t getLargeAttributeSizeLimit ( )
static

Return the size limits for eliding large attributes.

Definition at line 36 of file ViewOpGraph.cpp.

◆ llvmViewGraph()

void llvmViewGraph ( Region & region,
const Twine & name )
static

Generate a CFG for a region and show it in a window.

Definition at line 467 of file ViewOpGraph.cpp.

Referenced by mlir::Region::viewGraph().

◆ quoteString()

std::string quoteString ( const std::string & str)
static

Put quotation marks around a given string.

Definition at line 53 of file ViewOpGraph.cpp.

◆ strFromOs()

std::string strFromOs ( function_ref< void(raw_ostream &)> func)
static

Return all values printed onto a stream as a string.

Definition at line 45 of file ViewOpGraph.cpp.

Variable Documentation

◆ kLineStyleControlFlow

const StringRef kLineStyleControlFlow = "dashed"
static

Definition at line 30 of file ViewOpGraph.cpp.

◆ kLineStyleDataFlow

const StringRef kLineStyleDataFlow = "solid"
static

Definition at line 31 of file ViewOpGraph.cpp.

◆ kShapeNode

const StringRef kShapeNode = "Mrecord"
static

Definition at line 32 of file ViewOpGraph.cpp.

◆ kShapeNone

const StringRef kShapeNone = "plain"
static

Definition at line 33 of file ViewOpGraph.cpp.