[PATCH] D20116: Add speculatable function attribute

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 15:01:32 PDT 2017


sanjoy added a comment.

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

> I'm fine with restricting speculatable to only appear where it appears on a function declaration/definition unless/until we can figure out semantics for it on a call site in general. I don't want it restricted to intrinsics specifically, but I don't think that's the problem.


Only function-level `speculatable` (and no call site specific `speculatable`) seems less problematic.  It would mean having a function declaration or definition incorrectly marked as `speculatable`, even if it is never called, is UB; but I can live with that as long as that is properly documented.


https://reviews.llvm.org/D20116





More information about the llvm-commits mailing list