Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 950 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 950 Bytes

Pyramid

A Python script to generate Graphviz dot format data and SVG call graph from RTL intermediate representation of gcc.

Why is it called Pyramid?

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'])

Prerequisite

pip install pydotplus

Usage

  • 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