Interprocedural analysis (IPA)
GCC builds a “call graph”, recording which functions call which other
functions, and it uses this for various optimizations.
It is constructed by the “*build_cgraph_edges” pass.
In case it’s of interest, it is available via the following Python API:
Get a list of all
Return the GraphViz source for a rendering of the current callgraph, as a
Here’s an example of such a rendering:
gcc.FunctionDecl for this node within the callgraph
The function calls made by this function, as a list of
The places that call this function, as a list of
Internally, this wraps a struct cgraph_node *
The function that makes this call, as a
The function that is called here, as a
gcc.GimpleCall statememt for the function call
Internally, this wraps a struct cgraph_edge *