[PATCH] D20116: Add speculatable function attribute

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


sanjoy added a comment.

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

> In https://reviews.llvm.org/D20116#740922, @arsenm wrote:
>
> >
>
>
> Why only for intrinsics? I thought we had concluded that we'd only allow it for declarations and not on call sites (which may technically mean on call sited but only matching the declaration). I think it is important that we can apply it to regular functions.


I think a general speculatable attribute that is allowed only on functions decls is *less problematic*[0] that a context sensitive one, but I think speculatable intrinsics are clearly okay.  Therefore my opinion is (which I expressed on IRC to Matt) is to first land the intrinsic variant of this, since that's what he's blocked on; and then we can go ahead with more aggressive variants on subsequent patches.

[0] https://reviews.llvm.org/D20116#709352


https://reviews.llvm.org/D20116





More information about the llvm-commits mailing list