A Python script to generate Graphviz dot format data and SVG call graph from RTL intermediate representation of gcc.
Thanks to brilliant idea from Egypt, the name Pyramid implies where the idea itself comes from. In the other hand this Pyramid and Python both start with the same prefix. That is why it is called Pyramid. The following snippet shows how the name Egypt comes.
print([chr(ord(c) + 13) if chr(ord(c) + 13) <= 'z' else chr(ord(c) + 13 - 26) for c in 'rtlcg'])
pip install pydotplus
- Make sure that input RTL(Register Transfer Language) files generated by the compiler are prepared
make clean && make CFLAGS=-fdump-rtl-expand
- Run the script
./pyramid.py [-o callgraph.svg] [--omit 'some_function1, some_function2'] <rtl-file-list>
- Open the output SVG file with your Chrome browser