llvm::BFIDOTGraphTraitsBase

DOT GraphTraits helpers for block-frequency visualization.

Synopsis

Declared in <llvm/Analysis/BlockFrequencyInfoImpl.h>

template<
    class BlockFrequencyInfoT,
    class BranchProbabilityInfoT>
struct BFIDOTGraphTraitsBase
    : DefaultDOTGraphTraits

Description

Shared base for IR and Machine IR frequency DOT viewers. Formats node labels and hot-edge/node attributes from a BlockFrequencyInfo analysis.

Base Classes

NameDescription
DefaultDOTGraphTraitsDefault implementations of all DOTGraphTraits customization hooks.

Type Aliases

NameDescription
EdgeIter Iterator over outgoing edges of a node.
GTraits GraphTraits specialization for the frequency analysis.
NodeIter Iterator over all nodes in the graph.
NodeRef Reference type for a CFG node in the graph.

Member Functions

NameDescription
BFIDOTGraphTraitsBase [constructor]Construct traits, optionally requesting the simple DOT style.
getEdgeAttributes Return DOT attributes for the successor edge at EI, including weight.
getNodeAttributes Return DOT attributes that highlight hot nodes in red.
getNodeLabel getNodeLabel overloads

Static Member Functions

NameDescription
addCustomGraphFeatures Emit graph features beyond ordinary nodes and edges.
edgeTargetsEdgeSource Return true if this outgoing edge should target another edge source.
getEdgeAttributes Return custom DOT attributes for a particular edge.
getEdgeDestLabel Return the incoming edge destination label at the given index.
getEdgeSourceLabel Return a label for the edge source itself, if any.
getEdgeTarget Return the outgoing edge that is the target of this edge.
getGraphName getGraphName overloads
getGraphProperties Return custom properties for the top-level DOT graph structure.
getNodeAttributes Return custom DOT attributes for the given node.
getNodeDescription Return an optional longer description for the given node.
getNodeIdentifierLabel Return a unique identifier string for the given node.
hasEdgeDestLabels hasEdgeDestLabels - If this function returns true, the graph is able to provide labels for edge destinations.
isNodeHidden Return true if the given node should be omitted from the graph.
numEdgeDestLabels Return how many incoming edge destination labels the node has.
renderGraphFromBottomUp renderGraphFromBottomUp - If this function returns true, the graph is emitted bottom-up instead of top-down. This requires graphviz 2.0 to work though.
renderNodesUsingHTML Return true if nodes should be rendered with HTML-like labels.

Data Members

NameDescription
MaxFrequency Highest block frequency seen while rendering, used for hot highlighting.

Protected Member Functions

NameDescription
isSimple Return true if this traits instance was constructed for simple names.