<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Thanks for the response.</div>
<div>To clarify in your suggestion, llvm-link will combine the modules but not run the optimization pass, that is still delayed until the final binary is built, correct?</div>
<div><br>
</div>
<div>My use case is apply LTO to roughly program subsets; sacrificing effectiveness to avoid scaling problems and to allow the artifacts to be reused like archives and cached like .o’s.</div>
<div>I need to trigger the optimizer on the intermediate rather than defer to final link for these goals.</div>
<div><br>
</div>
<div>—david</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> on behalf of Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, December 4, 2015 at 4:02 PM<br>
<span style="font-weight:bold">To: </span>David Callahan <<a href="mailto:dcallahan@fb.com">dcallahan@fb.com</a>><br>
<span style="font-weight:bold">Cc: </span>LLVM Dev Mailing list <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [llvm-dev] LTO on libraries<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 4, 2015, at 3:54 PM, David Callahan via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">Hello,</div>
<div class=""><br class="">
</div>
<div class="">Is there a combination of the current tools would would allow me to apply LTO to a set of object files where are less than an entire application? Similar to “ld –r” for doing a partial link.</div>
<div class="">I assume it would start with “clang –flto –c {a,b,c}.c” but the a subsequent link step fails do to unresolved references of course.</div>
<div class="">Using llvm-link will linke the bitcode files but does not trigger compilation.</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>You can llvm-link and then run clang. Note that the result of LTO in this case is not as powerful as when it is linker driver, since you can’t internalize.</div>
<div>You may also want to look at llvm-lto, but it can be annoying because it requires (AFAIK) an export list.</div>
<div><br class="">
</div>
<div>What is your use-case?</div>
<div><br class="">
</div>
<div>— </div>
<div>Mehdi</div>
<div><br class="">
</div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class=""><br class="">
</div>
<div class="">Thanks</div>
<div class="">david</div>
</div>
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</span>
</body>
</html>