[LLVMdev] [RFC] NoBuiltin Attribute

David Blaikie dblaikie at gmail.com
Wed Feb 20 13:35:47 PST 2013


On Wed, Feb 20, 2013 at 12:39 PM, Chris Lattner <clattner at apple.com> wrote:

> On Feb 20, 2013, at 8:40 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> Sure, if you're willing to sacrifice the possible simplification of all
> indirect calls in any function that has even one nobuiltin requirement.
>
> I don't understand what you mean by this.
>
1) annotate calls
> Pro: you can inline calls without pessimizing the function you inline into
> Con: you pessimize all indirect calls in functions with at least one
> nobuiltin requirement
>
> Can you give an example illustrating the con?  I don't see how anything is
> pessimized with this approach.
>


Yep, sorry - seems I added more confusion to this thread rather than less.

The only con I can see to the call-site annotation scheme is that you have
to annotate all indirect calls (I assume there's some compile-time cost per
thing you annotate so one would prefer to annotate fewer things - but
probably a relatively small issue?) and then any direct call to the
specific functions you care about.

If you do this then, yes, you can inline in both ways (inlining other
functions into the "don't simplify my calls" function without having
to pessimise the inlined code and inline the function into its
callers without having to pessimise those either) correctly/optimally.

Just comes at the compile-time cost of annotating all calls to relevant
builtins and all indirect calls.

Dandy - sorry for adding to the confusion.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130220/142b21c0/attachment.html>


More information about the llvm-dev mailing list