Skip to content

lucmann/pyramid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

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

About

rewrite Egypt in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages