<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 3, 2015 at 5:48 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I really don't like this. I really don't like the prior solution either.<br>
<br>
Today, we have subtle, hard to diagnose correctness bugs. Bad bad bad.<br>
<br>
With this we have subtle, hard to diagnose performance bugs combined with a bit of a maintenance nightmare to keep this up to date. Bad bad bad.<br>
<br>
I also fear the performance bugs will in practice happen much more often. I'm seriously worried about the string attributes for example.<br>
<br>
I think we need to back up and think of a better design for this. A *much* better design. Do you have any thoughts on how to do this in a more maintainable way? If not I'll try to write something else.<br>
<br></blockquote><div><br></div><div>To make this more maintainable, I think there should be a way to add all the information that is needed to decide whether a function is inlinable to the definition of the function attribute. With this change, whoever wants to define and add a new function attribute has to think hard about whether the inliner should check for compatibility.</div><div> </div><div>I'm looking into using table-gen to generate the target-independent enums and functions that check the enum and string attributes to determine the inlinability of a function, but I'm open to other ideas.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Naturally, if there are specific attributes that are casuing problems, let's get a targeted fix in place for those attributes.<br>
<div><div><br>
<br>
<a href="http://reviews.llvm.org/D7802" target="_blank">http://reviews.llvm.org/D7802</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>