[PATCH] D20116: Add speculatable function attribute

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 12:55:10 PDT 2017


sanjoy added a comment.

In https://reviews.llvm.org/D20116#741170, @hfinkel wrote:

> Okay, unfortunately, this is only useful to me if we allow it on function declarations


I had somehow missed this bit ^ and I was under the impression that the main motivation for a general attribute was more completeness than anything else.

> I thought that we had agreed that allowing it on function declarations was okay so long as we documented the fact that this introduces potential UB just by declaring such a function, so let's do that.

I had not phrased my concession clearly. :)

Just to be clear, I don't think they're **okay**, but I can live with them in the spirit of begin pragmatic.

So yes, if this attribute will be useless to you without the generalization to non-intrinsics, then I won't object to checking in the previous version of this patch.


https://reviews.llvm.org/D20116





More information about the llvm-commits mailing list