<div dir="ltr">ping<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 3:24 PM, Akira Hatanaka <span dir="ltr"><<a href="mailto:ahatanak@gmail.com" target="_blank">ahatanak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi dexonsmith, chandlerc, echristo,<br>
<br>
This patch changes functionsHaveCompatibleAttribute to list the attributes that can be ignored rather than listing the attributes that should be checked (whitelist, instead of blacklist). I think this is better as we won't unintentionally inline a function that is incompatible with the caller when a new function attribute is added.<br>
<br>
In my patch, I've whitelisted all function attributes listed in <a href="http://llvm.org/docs/LangRef.html#function-attributes" target="_blank">http://llvm.org/docs/LangRef.html#function-attributes</a> except for these two:<br>
alignstack(<n>)<br>
noimplicitfloat<br>
<br>
None of the string attributes have been added to the whitelist yet, so functions that have incompatible string attributes (for example, functions that have incompatible fast-math attributes) will not get inlined.<br>
<br>
<a href="http://reviews.llvm.org/D7802" target="_blank">http://reviews.llvm.org/D7802</a><br>
<br>
Files:<br>
  lib/Analysis/IPA/InlineCost.cpp<br>
  test/Transforms/Inline/attributes.ll<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>
</blockquote></div><br></div></div>