CIRCT  19.0.0git
Functions
Analysis.cpp File Reference
#include "PassDetails.h"
#include "circt/Dialect/Handshake/HandshakeOps.h"
#include "circt/Dialect/Handshake/HandshakePasses.h"
#include "circt/Support/LLVM.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/IndentedOstream.h"
#include "llvm/ADT/TypeSwitch.h"
#include <optional>
Include dependency graph for Analysis.cpp:

Go to the source code of this file.

Functions

static bool isControlOp (Operation *op)
 
static std::string dotPrintNode (mlir::raw_indented_ostream &outfile, StringRef instanceName, Operation *op, DenseMap< Operation *, unsigned > &opIDs)
 Prints an operation to the dot file and returns the unique name for the operation within the graph. More...
 
static bool isControlOperand (Operation *op, Value v)
 Returns true if v is used as a control operand in op. More...
 
static std::string getLocalName (StringRef instanceName, StringRef suffix)
 
static std::string getArgName (handshake::FuncOp op, unsigned index)
 
static std::string getUniqueArgName (StringRef instanceName, handshake::FuncOp op, unsigned index)
 
static std::string getResName (handshake::FuncOp op, unsigned index)
 
static std::string getUniqueResName (StringRef instanceName, handshake::FuncOp op, unsigned index)
 
static void tryAddExtraEdgeInfo (mlir::raw_indented_ostream &os, Operation *from, Value result, Operation *to)
 Emits additional, non-graphviz information about the connection between from- and to. More...
 

Function Documentation

◆ dotPrintNode()

static std::string dotPrintNode ( mlir::raw_indented_ostream &  outfile,
StringRef  instanceName,
Operation *  op,
DenseMap< Operation *, unsigned > &  opIDs 
)
static

Prints an operation to the dot file and returns the unique name for the operation within the graph.

Fill color

Shape

Label

If we have an ID attribute, we'll add the ID of the operation as well. This helps crossprobing the diagram with the Handshake IR and waveform diagrams.

Style; add dashed border for control nodes

Definition at line 156 of file Analysis.cpp.

References isControlOp().

◆ getArgName()

static std::string getArgName ( handshake::FuncOp  op,
unsigned  index 
)
static

Definition at line 291 of file Analysis.cpp.

Referenced by getUniqueArgName().

◆ getLocalName()

static std::string getLocalName ( StringRef  instanceName,
StringRef  suffix 
)
static

Definition at line 287 of file Analysis.cpp.

Referenced by getUniqueArgName(), and getUniqueResName().

◆ getResName()

static std::string getResName ( handshake::FuncOp  op,
unsigned  index 
)
static

Definition at line 300 of file Analysis.cpp.

Referenced by getUniqueResName().

◆ getUniqueArgName()

static std::string getUniqueArgName ( StringRef  instanceName,
handshake::FuncOp  op,
unsigned  index 
)
static

Definition at line 295 of file Analysis.cpp.

References getArgName(), and getLocalName().

◆ getUniqueResName()

static std::string getUniqueResName ( StringRef  instanceName,
handshake::FuncOp  op,
unsigned  index 
)
static

Definition at line 304 of file Analysis.cpp.

References getLocalName(), and getResName().

◆ isControlOp()

static bool isControlOp ( Operation *  op)
static

Definition at line 30 of file Analysis.cpp.

Referenced by dotPrintNode(), and isControlOperand().

◆ isControlOperand()

static bool isControlOperand ( Operation *  op,
Value  v 
)
static

Returns true if v is used as a control operand in op.

Definition at line 276 of file Analysis.cpp.

References isControlOp().

◆ tryAddExtraEdgeInfo()

static void tryAddExtraEdgeInfo ( mlir::raw_indented_ostream &  os,
Operation *  from,
Value  result,
Operation *  to 
)
static

Emits additional, non-graphviz information about the connection between from- and to.

This does not have any effect on the graph itself, but may be used by other tools to reason about the connectivity between nodes.

Definition at line 354 of file Analysis.cpp.