<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thanks you so much Andrew.<div>That helps.</div><div><br></div><div><br>--- On <b>Fri, 7/1/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: Friday, July 1, 2011, 9:22 AM<br><br><div id="yiv1196616510">Unless someone else responds with "I've already done that" then you need to implement a pass. It's probably something you want to customize to your needs anyway.<div>-Andy</div><div><br><div><div>On Jun 30, 2011, at 11:50 PM, janarbek wrote:</div><br class="yiv1196616510Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0"
 border="0"><tbody><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><<a rel="nofollow" ymailto="mailto:atrick@apple.com" target="_blank" href="/mc/compose?to=atrick@apple.com">atrick@apple.com</a>></i></b> wrote:<br><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;"><br>From: Andrew Trick <<a rel="nofollow"
 ymailto="mailto:atrick@apple.com" target="_blank" href="/mc/compose?to=atrick@apple.com">atrick@apple.com</a>><br>Subject: Re: [LLVMdev] Generating DFG or CDFG from C code<br>To: "janarbek"
 <<a rel="nofollow" ymailto="mailto:canarbekmatay@yahoo.com" target="_blank" href="/mc/compose?to=canarbekmatay@yahoo.com">canarbekmatay@yahoo.com</a>><br>Cc: <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, 10:51 PM<br><br><div id="yiv1196616510"><br><div><div>On Jun 30, 2011, at 10:05 PM, janarbek wrote:</div><br class="yiv1196616510Apple-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">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">canarbekmatay@yahoo.com</a>><br>Subject: Generating DFG or CDFG from C code<br>To: <a rel="nofollow">llvmdev@cs.uiuc.edu</a><br>Date: Thursday, June 30, 2011, 11:55 AM<br><br><div id="yiv1196616510"><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="yiv1196616510Apple-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">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></tbody></table></blockquote></div><br></div></div></blockquote></div></td></tr></table>