<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 10/21/14, 5:27 PM, Amir H. Ashouri
wrote:<br>
</div>
<blockquote
cite="mid:CAPh1xCTFGsPJRhQ495EzVT5M7KoiKuGoQXMBnmCjsrC8N0DubQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hello Everyone,
<div><br>
</div>
<div>Just subscribed to the mailing list.</div>
<div><br>
</div>
<div>I was wondering how I am going to fetch each functions of a
specific source code file (c/c++) using the LLVM framework.
For instance, I would like to apply certain passes using
llvm-opt on certain functions not the whole file. </div>
<div><br>
</div>
<div>I would appreciate any hints or idea leading me about the
starting point.</div>
</div>
</blockquote>
<br>
You might be able to use the llvm-extract tool to pull out the
functions you want into a separate bitcode file and then use opt to
optimize them. You'd then need to create a second bitcode file that
contains the remaining functions (using llvm-extract again).
Finally, you'd take the optimized bitcode file and the bitcode file
containing the other functions and link them together using clang
and libLTO or the llvm-link tool.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:CAPh1xCTFGsPJRhQ495EzVT5M7KoiKuGoQXMBnmCjsrC8N0DubQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>-Amir </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>