<p dir="ltr">FWIW this is on my list to look at in the next day or so. </p>
<br><div class="gmail_quote">On Thu, Mar 26, 2015, 9:40 PM Bob Wilson <<a href="mailto:bob.wilson@apple.com">bob.wilson@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Mar 24, 2015, at 11:16 AM, Akira Hatanaka <<a href="mailto:ahatanak@gmail.com" target="_blank">ahatanak@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Any thoughts?<br></div></div></blockquote><div><br></div>This looks promising. It seems like it ought to address at least some of Chandler’s concerns with your previous patch. I’d like to see what the patch looks like for handling target-specific attributes.</div><div><br></div><div>Chandler, are you OK with the general direction of this?</div><div><br></div><div><blockquote type="cite"><div></div></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 5:36 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>> On 2015-Mar-10, at 14:59, Akira Hatanaka <<a href="mailto:ahatanak@gmail.com" target="_blank">ahatanak@gmail.com</a>> wrote:<br>
><br>
> I came up with a patch that addresses the concerns Chandler brought up. This is still a WIP patch, so I would like to hear feedback before I go too far down this route.<br>
><br>
> The updated patch takes a completely different approach to determining a function's inlinability. It uses table-gen to specify the attributes' enums along with their inlinability/compatibility information. With this new approach, whenever someone defines and uses a new attribute in the IR, the compatibility information has to be added too. Currently, there is only one field in class Attr in the .td file, which indicates whether the inliner should check the attribute's compatibility, but it should be easy to add other fields or rules if other passes need more information about the attribute. For example, I think most of the code in the verifier that looks at attributes in the IR can be auto-generated by table-gen.<br>
><br>
> The patch doesn't add any checks for the target-specific function attribute strings, but it can be done in a similar way to target-independent enum attributes. Functions are auto-generated by table-gen from .td files and are passed to the constructor of TargetIRAnalysis to enable checking compatibility of target-specific attributes. Also, we should be able to generate code that checks the validity of a string attribute added to the IR, which is something we currently lack. It would issue a warning or error if a string not recognized by the target was used to get an attribute from the attribute set.<br>
><br>
<br>
</span>This direction SGTM.  @Chandler, does this look better to you?<br>
<div><div><br>
><br>
> <a href="http://reviews.llvm.org/D7802" target="_blank">http://reviews.llvm.org/D7802</a><br>
><br>
> Files:<br>
>  include/llvm/Analysis/InlineCost.h<br>
>  include/llvm/Analysis/TargetTransformInfo.h<br>
>  include/llvm/IR/Attributes.h<br>
>  include/llvm/IR/EnumAttributes.td<br>
>  lib/Analysis/IPA/InlineCost.cpp<br>
>  lib/Analysis/TargetTransformInfo.cpp<br>
>  lib/CodeGen/LLVMTargetMachine.cpp<br>
>  lib/IR/Attributes.cpp<br>
>  lib/IR/Makefile<br>
>  lib/Target/AArch64/AArch64TargetMachine.cpp<br>
>  lib/Target/ARM/ARMTargetMachine.cpp<br>
>  lib/Target/Mips/MipsTargetMachine.cpp<br>
>  lib/Target/NVPTX/NVPTXTargetMachine.cpp<br>
>  lib/Target/PowerPC/PPCTargetMachine.cpp<br>
>  lib/Target/R600/AMDGPUTargetMachine.cpp<br>
>  lib/Target/TargetMachine.cpp<br>
>  lib/Target/X86/X86TargetMachine.cpp<br>
>  lib/Target/XCore/XCoreTargetMachine.cpp<br>
>  utils/TableGen/Attribute.cpp<br>
>  utils/TableGen/TableGen.cpp<br>
>  utils/TableGen/TableGenBackends.h<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>
</div></div>> <D7802.21626.patch><br>
<br>
</blockquote></div><br></div></div></div></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></blockquote></div></div>______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div>