[cfe-dev] CFG documentation

Gaurav Mittal gaurav at binachip.com
Fri Dec 17 05:40:53 PST 2010


Hi Ted,
Thanks for the link. I had actually already gone through all the
documentation online and am currently sifting through the source code
starting at cfg.h and branching out. I think using the command line to dump
the CFG will help get a jump start, thanks. 

Through my posting on the mailing list I was looking for more information
on:
1. Whether there exists a CFG API that hides the implementation details.
2. The CFG structure and how it relates/uses the AST. E.g. how would one
lookup the nature of a variable in an expression or its scope, how the
symbol tables are accessed, etc. I think this would relate to how the AST
gets translated to the CFG.

Regards,
Gaurav


-----Original Message-----
From: Ted Kremenek [mailto:kremenek at apple.com] 
Sent: Thursday, December 16, 2010 6:48 PM
To: gaurav at binachip.com
Cc: cfe-dev at cs.uiuc.edu
Subject: Re: [cfe-dev] CFG documentation

Hi Gaurav,

There is some documentation on the CFG here:

  http://clang.llvm.org/docs/InternalsManual.html#CFG

It's a bit dated, but it explains the core concepts of how the CFG is
represented.  The CFG has recently been expanded so that it can contain
other elements besides just Stmt*, but the design is still the same.

Note that you can dump CFGs from the command line:

$ clang -fsyntax-only -Xclang -analyze -Xclang -dump-cfg t.c

On Dec 15, 2010, at 9:25 AM, Gaurav Mittal wrote:

> Hi folks,
> I'm trying to hack CLANG to translate its Control Flow Graph (CFG) to the
> native CFG for my own tool -- essentially use CLANG as a frontend (and
> possibly more) to a pre-existing tool. Does anybody have any documentation
> on the CLANG control flow graph other than the doxygen stuff? I would
really
> appreciate any pointers on where to start.
> 
> Regards,
> Gaurav
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101217/5a5267b3/attachment.html>


More information about the cfe-dev mailing list