<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body 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 19, 2015, at 8:11 AM, James Molloy <<a href="mailto:james@jamesmolloy.co.uk" class="">james@jamesmolloy.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">It's interesting to think about, but not something I'm intending to attack right now. <br class=""><br class="">I mainly just wanted to know the answer to Joerg's question, and now I do :)<br class=""></div></blockquote><div><br class=""></div><div><br class=""></div><div>I missed Joerg’s question earlier, I didn’t know what you were referring to. So I’ll answer here: AFAIK per-function attributes do not record the optimization level but only some optimization attributes: minsize, optsize, option. </div><div><div>A fundamental issue is that the pipeline can change between O0/O1/O2/O3, and this is intrinsically problematic since the pipeline cannot be “per-function” overall.</div><div class=""><div>What we were thinking to implement would be some information at the module level to instruct the ThinLTO optimizer of the flags to enable/disable, probably in global metadata.</div></div><div class=""><br class=""></div></div><div>The CodeGenOpt::Level has the same issue that it could be used to change the pipeline theoretically. It is not a problem at the time since (AFAIK) the CodeGen pipeline is intrinsically per function, but this may change with the new instruction selector.</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><br class="">James<br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, 19 Dec 2015 at 17:17, Mehdi Amini via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
<br class="">
Sent from my iPhone<br class="">
<br class="">
> On Dec 18, 2015, at 11:11 PM, James Molloy <<a href="mailto:James.Molloy@arm.com" target="_blank" class="">James.Molloy@arm.com</a>> wrote:<br class="">
><br class="">
> Hi Mehdi,<br class="">
><br class="">
>> On 18 Dec 2015, at 23:17, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>> wrote:<br class="">
>><br class="">
>> The alternative to the command line flag is to encode the optimization level in the bitcode itself.<br class="">
><br class="">
> You may have answered Joerg's question here - I take it this is not yet implemented?<br class="">
<br class="">
Not implemented. We have settled on the various tradeoff. Are you interested to think about this?<br class="">
--<br class="">
Mehdi<br class="">
><br class="">
> James<br class="">
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.<br class="">
><br class="">
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></body></html>