[Dailydave] Source Code Analysis

Alexander Sotirov asotirov at determina.com
Mon Sep 18 02:23:02 EST 2006


Matt wrote:
> How do you track this inter-function and inter-module? Are you using newer
> interfaces exposed by GCC 4.x's GIMPLE stuff or..?

My code doesn't do any interprocedural analysis. That's why it's a thesis and
not a publicly released tool :-)

I used the GIMPLE representation, but at the time (around the 4.0 release) GCC
did not have a stable interprocedural analysis (IPA) framework. In 4.1 there is
support for IPA passes, but the SSA form of GIMPLE that I use is not available.
GCC 4.2 (to be released soon) will be the first version that supports IPA on the
SSA form and it will become feasible to implement my analysis as an
interprocedural pass.

The situation with inter-module analyses is even more complicated. The GCC
developers are currently working on a project called LTO (link-time
optimization), but it will probably be at least another year or two until it is
usable. The good news is that if you have an interprocedural analysis pass, with
LTO it should work on the whole program without any changes.

If anybody is interested in implementing these kinds of analyses right now, you
should probably look at LLVM.

Alex


More information about the Dailydave mailing list