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 |
|
backedges class-attribute
instance-attribute
backedges: dict[str, set[str]] = {}
Mapping from symbol names to backedges.
defs class-attribute
instance-attribute
defs: dict[str, Method] = {}
Mapping from symbol names to methods.
get_edges
get_edges() -> Iterable[tuple[str, str]]
Get the edges of the call graph.
Source code in src/kirin/analysis/callgraph.py
43 44 45 46 47 |
|
get_neighbors
get_neighbors(node: str) -> Iterable[str]
Get the neighbors of a node in the call graph.
Source code in src/kirin/analysis/callgraph.py
39 40 41 |
|
get_nodes
get_nodes() -> Iterable[str]
Get the nodes of the call graph.
Source code in src/kirin/analysis/callgraph.py
49 50 51 |
|