<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I compile my library to bytecode and then declare all my functions
as linkonce (
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://llvm.org/docs/LangRef.html#linkage-types">http://llvm.org/docs/LangRef.html#linkage-types</a>)
and then use llvm-link to produce a minimal module, which works
pretty well for me.<br>
<br>
Regards,<br>
Sam<br>
<br>
<div class="moz-cite-prefix">On 20/05/13 21:20, Frank Winter wrote:<br>
</div>
<blockquote cite="mid:519A8589.4040206@jlab.org" type="cite">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>
_______________________________________________
<br>
LLVM Developers mailing list
<br>
<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>
<br>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
<br>
</blockquote>
<br>
</body>
</html>