Hi Ted,<br><br>I meant the latter. I was earlier under the impression that the CFG class, used in clang, was a layer over the LLVM IR. Thanks for the clarification (and also the doc: <a href="http://clang.llvm.org/docs/InternalsManual.html#CFG">http://clang.llvm.org/docs/InternalsManual.html#CFG</a>).<br>
<br>One last question: is it possible to do basic block replication (and hence the underlying AST node duplication and the resulting LLVM IR generation) using the CFG class in clang, or is it a read-only structure, meant only for analysis and not transformation ?<br>
<br>thanks,<br>Prakash<br><br><div class="gmail_quote">On Mon, Jun 28, 2010 at 7:08 PM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Prakash,<br>
<br>
When you say "CFG", are you talking about the LLVM IR or the source-level CFGs that clang supports for some warnings and static analysis? For the latter, the source-level CFGs are just a layer on top of the original ASTs; the elements of the basic blocks are the original AST nodes.<br>
<font color="#888888"><br>
Ted<br>
</font><div><div></div><div class="h5"><br>
On Jun 24, 2010, at 7:45 AM, Prakash Prabhu wrote:<br>
<br>
> Hi,<br>
><br>
> I am just curious to find out whether any correspondence between AST nodes and CFG is maintained in clang ? For instance, is it possible to find out once a CFG is generated, what nodes in the CFG correspond to a CompoundStmt node in the AST ? I guess this correspondence will be blurred once more and more transformations are done the CFG, but if one is interested in only doing an analysis on the CFG based on some information available from the AST (for instance analyzing flow information on those CFG nodes that correspond to certain CompoundStmts, or certain try... catch sequences), is there a simple way to do it ?<br>
><br>
> thanks,<br>
> Prakash<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</div></div></blockquote></div><br>