<div dir="ltr">Internalize and GlobalDCE should be what you need.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 20, 2013 at 4:20 PM, Frank Winter <span dir="ltr"><<a href="mailto:fwinter@jlab.org" target="_blank">fwinter@jlab.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My module contains one function that calls a handful of functions in another module (which contains a huge collection of functions). The goal is to make the module 'self-contained', i.e. no calls across module boundaries, and as minimal as possible, i.e. it does not contain any function which is not called directly or indirectly from the original function. So, I linked in the callee module to the caller module and ran the internalize pass to filter/mark the non-external global symbols. Is this a good first step towards the goal? How can I eliminate unused global symbols or make the module minimal (with the existing (trunk) passes)? Ideally only the (directly or indirectly) referenced symbols survive. Is this possible or do I need to develop such passes?<br>

<br>
Frank<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div>