[PATCH] D14227: Add a new attribute: norecurse

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 12:14:57 PST 2015


Right. Also, all the optimizations I'm aware of that would care about this
care about knowing that something does *not* recurse. If we reversed the
polarity of the attribute, we'd be optimizing when the attribute was not
set on a function which would not be conservatively correct.

On Mon, 2 Nov 2015 at 19:57 Duncan P. N. Exon Smith via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> > On 2015-Nov-02, at 11:53, David Blaikie via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> >
> >
> > On Mon, Nov 2, 2015 at 11:51 AM, Aaron Ballman via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> > Why an attribute specifying that recursion does not happen instead of
> one specifying that it does? It seems like functions generally do not
> recurse, which suggests marking recursion would require less annotations.
> >
> >  Most functions you don't know if they recurse - so you'd have to
> annotate almost every function with "may recurse", I imagine.
> >
> > (I suppose that's the issue, this attribute isn't "does recurse" it's
> "may recurse")
>
> Right.  Almost any call to an external function may recurse.
>
> > ~Aaron
> >
> > On Nov 2, 2015 1:15 PM, "Mehdi AMINI via llvm-commits" <
> llvm-commits at lists.llvm.org> wrote:
> > joker.eph added a comment.
> >
> > Patch looks good to me, but it would be nice to have more support for
> the attribute (or maybe at least wait a little bit for people to be able to
> object).
> >
> >
> > ================
> > Comment at: include/llvm/IR/Function.h:328
> > @@ -327,1 +327,3 @@
> >
> > +  /// @brief Determine if the function is known not to recurse,
> directly or
> > +  /// indirectly.
> > ----------------
> > Just a nitpick: I believe we enabled autobrief and we shouldn't add it
> anymore when unnecessary.
> >
> >
> > Repository:
> >   rL LLVM
> >
> > http://reviews.llvm.org/D14227
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/dbfa6937/attachment.html>


More information about the llvm-commits mailing list