[PATCH] D41104: Set the NoRecurse attribute for the dbg intrinsics.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 09:47:59 PST 2017


mattd added a comment.

Thanks for the feedback Hal.  I agree, I think many intrinsics can be added/marked-norecurse.  But for this change I just wanted to isolate the change to the debugging intrinsics, and keeping with the theme that dbg intrinsics should not influence code generation.

Also, you put forward a valid concern, in your example you mention that 'foo' can be marked as norecurse.  I do not think that is true.  My reasoning is the following

> norecurse
>  This function attribute indicates that the function does not call itself either directly or indirectly down any possible call path. This produces undefined behavior at runtime if the function ever does recurse.

Since 'foo' calls 'bar' and 'bar' calls 'foo', it seems to me that 'foo' in your example is indirectly recursive; foo indirectly calls itself on behalf of bar.


https://reviews.llvm.org/D41104





More information about the llvm-commits mailing list