For fun over the weekend I wrote a python script (using my
gcc-python-plugin[1]) to render an SVG diagram of GCC's optimization
passes (or, at least, based on my understanding of them).

This diagram shows the various GCC optimization passes, arranged
vertically, showing child passes via indentation.

The lifetime of the various properties that they maintain is shown,
giving the pass that initially creates the data (if any), the pass that
destroys it (if any), and each pass that requires a particular property
(based on the PROP_* flags).  I've attempted to make it look a little
like a subway train schematic map, where the properties are train lines,
and the passes are the stations they stop at; the initial/final passes
are the termini.

The resulting SVG can be seen at the top of:
http://readthedocs.org/docs/gcc-python-plugin/en/latest/tables-of-passes.html

Direct link to SVG, in case the above gets mangled on your browser:
http://readthedocs.org/docs/gcc-python-plugin/en/latest/_images/passes.svg
(550 x 3302 pixels; about 250k in size).

The script can be seen here (it uses pycairo to abstract the drawing
operations):
http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=blob;f=generate-passes-svg.py

Hope this is fun/helpful (and that I'm correctly interpreting the data!)
Dave

[1] https://fedorahosted.org/gcc-python-plugin/

Reply via email to