This release of the plugin adds support for gcc 4.8 (along with continued support for gcc 4.7 and gcc 4.6).
The source tree contains a new component: gcc-c-api. This provides a wrapper library libgcc-c-api.so that hides much of the details of GCC’s internals (such as the binary layout of structures, and the differences between GCC 4.6 through 4.8).
I plan for this to eventually be its own project, aiming at providing a stable API and ABI for working with GCC, once it has proven itself in the context of the python plugin.
The API provides an XML description of itself, which should greatly simplify the job of generating bindings for accessing GCC internals from other languages.
The plugin can now be used with GCC’s Link-Time Optimization feature (LTO), allowing whole-program visualizations and analysis.
For example, you can rendering a whole-program “supergraph” of control flow graphs using this invocation:
$ ./gcc-with-python \
examples/show-lto-supergraph.py \
-flto \
-flto-partition=none \
tests/examples/lto/input-*.c
which will render a bitmap of the supergraph like this:
Sane repr() implementations have been added to the following classes: gcc.CaseLabelExpr gcc.GimpleLabel gcc.BasicBlock gcc.SsaName gcc.ArrayRef gcc.ComponentRef gcc.PointerType gcc.IntegerType gcc.Location
gcc.Location instances can now be compared and sorted. They are ordered alphabetically by file, then by line number, then by column)