<div dir="ltr"><div class="gmail_extra">On Mon, Jan 14, 2013 at 4:46 AM, Justin Holewinski <span dir="ltr"><<a href="mailto:justin.holewinski@gmail.com" target="_blank" class="cremed">justin.holewinski@gmail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>If I understand the attributes correctly, they would be function-level attributes applied to IR functions, correct?  I'm curious what the semantics would be for cross-function optimization.  For example, consider a function "foo" defined with maxopt and a function "bar" defined with optsize.  If foo() calls bar() and the inliner wants to inline bar() into foo(), is that legal?  If so, that may cause odd effects as you may perform expensive optimizations later on the inlined version of bar(), even though the original function is marked optsize.<br>
</div></blockquote><div><br></div><div style>This is a great question. My plan would be: inlining doesn't impact the attributes. The inliner will be free to look at both the caller and the callee's attributes to choose the best inlining decision.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br></div>Also, a nit-pick:  can we make the naming consistent?  It feels a bit weird to have maxOPT and OPTsize.  Perhaps use sizeopt and minsizeopt, or optmax and optquick?</blockquote></div><br>Meh. I don't care really. It would require changing existing attributes, but we can do that. I think the most readable structure is the first:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>minsizeopt</div><div class="gmail_extra" style>sizeopt</div><div class="gmail_extra" style>quickopt</div><div class="gmail_extra" style>opt</div><div class="gmail_extra" style>
maxopt</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>I'd like to hear some support for one or the other of these before deciding.</div></div>