<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, 2 Nov 2015 at 19:57 Duncan P. N. Exon Smith via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On 2015-Nov-02, at 11:53, David Blaikie via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
><br>
><br>
> On Mon, Nov 2, 2015 at 11:51 AM, Aaron Ballman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> 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.<br>
><br>
>  Most functions you don't know if they recurse - so you'd have to annotate almost every function with "may recurse", I imagine.<br>
><br>
> (I suppose that's the issue, this attribute isn't "does recurse" it's "may recurse")<br>
<br>
Right.  Almost any call to an external function may recurse.<br>
<br>
> ~Aaron<br>
><br>
> On Nov 2, 2015 1:15 PM, "Mehdi AMINI via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> joker.eph added a comment.<br>
><br>
> 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).<br>
><br>
><br>
> ================<br>
> Comment at: include/llvm/IR/Function.h:328<br>
> @@ -327,1 +327,3 @@<br>
><br>
> +  /// @brief Determine if the function is known not to recurse, directly or<br>
> +  /// indirectly.<br>
> ----------------<br>
> Just a nitpick: I believe we enabled autobrief and we shouldn't add it anymore when unnecessary.<br>
><br>
><br>
> Repository:<br>
>   rL LLVM<br>
><br>
> <a href="http://reviews.llvm.org/D14227" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14227</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>