Call Graph
CallGraph dataclass
CallGraph(mt: ir.Method)
Bases: Printable
Call graph for a given ir.Method.
This class implements the kirin.graph.Graph protocol.
Pretty Printing
This object is pretty printable via .print() method.
Source code in src/kirin/analysis/callgraph.py
26 27 28 29 30 | |
backedges class-attribute instance-attribute
backedges: dict[Method, set[Method]] = {}
Mapping from symbol names to backedges (callee -> caller).
edges class-attribute instance-attribute
edges: dict[Method, set[Method]] = {}
Mapping from symbol names to edges (caller -> callee).
get_edges
get_edges() -> Iterable[tuple[ir.Method, ir.Method]]
Get the edges of the call graph.
Source code in src/kirin/analysis/callgraph.py
48 49 50 51 52 | |
get_neighbors
get_neighbors(node: ir.Method) -> Iterable[ir.Method]
Get the neighbors of a node in the call graph.
Source code in src/kirin/analysis/callgraph.py
44 45 46 | |
get_nodes
get_nodes() -> Iterable[ir.Method]
Get the nodes of the call graph.
Source code in src/kirin/analysis/callgraph.py
54 55 56 | |