[PATCH] D14227: Add a new attribute: norecurse

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 11:57:36 PST 2015


> 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



More information about the llvm-commits mailing list