[PATCH] D153414: [LLVM] Do not speculate convergent calls

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 06:39:50 PDT 2023


nikic added a comment.

In D153414#4437698 <https://reviews.llvm.org/D153414#4437698>, @arsenm wrote:

> In D153414#4437694 <https://reviews.llvm.org/D153414#4437694>, @nikic wrote:
>
>> Shouldn't this be covered by the speculatable attribute? A convergent function shouldn't be marked speculatable.
>
> It depends. In the future we could contextually speculate convergent instructions (e.g. if the conditions reaching the point are uniform)

I still think that would not allow you to put `speculatable` on the function. A speculatable function has to be speculatable //unconditional//. Absense of the speculatable attribute does not imply that the call cannot be speculated, just that we don't know that it is //always// safe to speculate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153414/new/

https://reviews.llvm.org/D153414



More information about the llvm-commits mailing list