<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 30, 2011, at 10:05 PM, janarbek wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><br>Hi All,<br>I am reposting my question again since i think my question was not clear enough. <br>I am wondering is it possible to generate Control Data Flow Graph from C using LLVM? or is it possible to get web-like structure of C code using llvm /<br><br>Thanks in advance,<br>Any comment suggestion would be appreciated.<br><br>Jan Ma.<br><br><div><font color="#00007f"></font> </div><br><div><font color="#00007f">===========================================</font></div><br><br>--- On <b>Thu, 6/30/11, janarbek <i><<a href="mailto:canarbekmatay@yahoo.com">canarbekmatay@yahoo.com</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: janarbek <<a href="mailto:canarbekmatay@yahoo.com">canarbekmatay@yahoo.com</a>><br>Subject: Generating DFG or CDFG from C code<br>To: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>Date: Thursday, June 30, 2011, 11:55 AM<br><br><div id="yiv1485380273"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Hi All,<div><br></div><div>I am new to LLVM. I want to generate a Dataflow graph or Control Dataflow graph from C code using LLVM. I have no idea how to do it in LLVM. I tried to use analysis and transform passes such as "<span class="yiv1485380273Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman'; font-size: medium;"><a rel="nofollow" target="_blank" href="http://llvm.org/docs/Passes.html#dot-cfg">-dot-cfg</a></span>" but it doesn't give what I want. I want to generate a node for each operation in C code. </div><div><br></div><div>Thanks in advance.</div><div>JM.</div><div><br></div></td></tr></tbody></table></div></blockquote></td></tr></tbody></table>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br><div>I don't know if anyone has already done this, but some important pieces are there. See Dataflow.h and GraphWriter.h.</div><div><br></div><div>I think you'll run into a problem though because the value graph isn't fully connected. You have to walk the instruction stream looking for "roots".</div><div><br></div><div>-Andy</div></body></html>