[PATCH] D123531: [GlobalsModRef][FIX] Ensure we honor synchronizing effects of intrinsics

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 08:12:56 PDT 2022


jdoerfert added a comment.

In D123531#3449199 <https://reviews.llvm.org/D123531#3449199>, @tra wrote:

> In D123531#3447211 <https://reviews.llvm.org/D123531#3447211>, @jdoerfert wrote:
>
>> In D123531#3446219 <https://reviews.llvm.org/D123531#3446219>, @tra wrote:
>>
>>> We need to document how `nosync` (or lack of it) interacts with other attributes describing side effects. E.g. interaction between `IntrReadMem`, `IntrArgMemOnly ` and (lack of) `nosync`.
>>
>>
>>
>> In D123531#3447021 <https://reviews.llvm.org/D123531#3447021>, @tra wrote:
>>
>>> @jdoerfert:  A friendly nag to update intrinsic attribute docs. Looks like they didn't make it to the landed change.
>>
>> You mean the above?
>
> Yes.
>
>> That ain't something I can actually "just do". My opinion and the opinion of others are known to be different.
>
> You do have the power to change the way LLVM works. I believe you do have the power to document how things work **now** and save other folks who just want to create an intrinsic the hassle of finding out about the quirks the hard way, when something breaks.

OK. But I'm still not sure where you want me to document what exactly. What I "changed" here is:

- Intrinsics can execute arbitrary code if they are not annotated with `nocallback`, and
- Intrinsics can make effects of other "threads of execution" visible if they are not annotated with `nosync`.

For me that was already a given because we don't have the opposite written anywhere (as far as I know).
I could put the two points explicitly here: https://llvm.org/docs/LangRef.html#intrinsic-functions, would that be a good place?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123531



More information about the llvm-commits mailing list