<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Andrew,<br>Thanks for the response. That helps a lot.<br><br>So that means I have to implement a pass, right ? Sorry for dumb question. I just started LLVM today.<br><br><br><div><font color="#00007f"></font> </div>  <div><font color="#00007f">===========================================</font></div>  <div><br><font color="#00007f">Phone : 82-42-860-1838<br>Fax : 82-42-860-6790</font></div>  <div><font color="#00007f">Cell Phone: 82-10-7599-1981</font></div>  <div><font color="#00007f">===========================================</font></div><br><br>--- On <b>Thu, 6/30/11, Andrew Trick <i><atrick@apple.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Andrew Trick <atrick@apple.com><br>Subject: Re: [LLVMdev] Generating DFG or CDFG from C code<br>To: "janarbek"
 <canarbekmatay@yahoo.com><br>Cc: llvmdev@cs.uiuc.edu<br>Date: Thursday, June 30, 2011, 10:51 PM<br><br><div id="yiv136352807"><br><div><div>On Jun 30, 2011, at 10:05 PM, janarbek wrote:</div><br class="yiv136352807Apple-interchange-newline"><blockquote type="cite"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><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 rel="nofollow" ymailto="mailto:canarbekmatay@yahoo.com"
 target="_blank" href="/mc/compose?to=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 rel="nofollow" ymailto="mailto:canarbekmatay@yahoo.com" target="_blank" href="/mc/compose?to=canarbekmatay@yahoo.com">canarbekmatay@yahoo.com</a>><br>Subject: Generating DFG or CDFG from C code<br>To: <a rel="nofollow" ymailto="mailto:llvmdev@cs.uiuc.edu" target="_blank" href="/mc/compose?to=llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>Date: Thursday, June 30, 2011, 11:55 AM<br><br><div id="yiv136352807"><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="yiv136352807Apple-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 rel="nofollow" ymailto="mailto:LLVMdev@cs.uiuc.edu" target="_blank" href="/mc/compose?to=LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a rel="nofollow" target="_blank" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a rel="nofollow" target="_blank"
 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></div></blockquote></td></tr></table>