Package cfg provides access to control flow graphs of LLVM IR functions.
Attrs specifies a set of DOT attributes as key-value pairs.
Attributes returns the DOT attributes of a node or edge.
A DominatorTree represents a dominator tree.
NewDom returns a new dominator tree based on the given graph.
Dominates reports whether A dominates B.
Edge represents an edge of a control flow graph.
Attributes returns the attributes of the edge.
SetAttribute sets the attribute of the edge.
Graph represents a control flow graph.
New returns a new control flow graph based on the given function.
ParseFile parses the given Graphviz DOT file into a control flow graph.
AddNode adds the given node to the graph. If the node is an entry node, the graph entry node is updated.
Entry returns the entry node of the control flow graph.
NewEdge returns a new Edge from the source to the destination node.
NewEdgeWithLabel returns a new edge from the source to the destination node in the graph, or the existing edge if already present.
NewNode returns a new graph node with a unique arbitrary ID.
NewNodeWithLabel returns a new node with the given basic block label in the graph, or the existing node if already present.
NodeByLabel returns the node with the given basic block label in the graph. The boolean return value indicates success.
RemoveNode removes n from the graph, as well as any edges attached to it. If the node is not in the graph it is a no-op.
SetEntry sets the entry node of the control flow graph.
SetNodeLabel sets the basic block label of the node.
Node represents a node of a control flow graph.
Attributes returns the DOT attributes of the node.
DOTID returns the DOT node ID of the node.
SetAttribute sets the attribute of the node.
SetDOTID sets the DOT node ID of the node.