[PATCH] D127383: Don't treat readnone call in presplit coroutine as not access memory

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 07:02:10 PDT 2022


nikic added a comment.

In D127383#3651637 <https://reviews.llvm.org/D127383#3651637>, @nhaehnle wrote:

> In D127383#3650988 <https://reviews.llvm.org/D127383#3650988>, @nikic wrote:
>
>> Do we also need to upgrade argmemonly to inaccessibleorargmemonly? Assuming that the thread ID counts as inaccessible memory.
>
> Nit: I wouldn't say thread ID counts as inaccessible memory, rather it's something that is apart entirely (given the change for `readnone`).
>
> I think it would be consistent to say that an `argmemonly` function is allowed to read the thread ID. That does suggest that analogous changes for `onlyAccessesArgMemory` are needed, but I haven't thought about it very carefully.

Yeah, you're right, it's not inaccessible memory under this model. I guess onlyAccessesInaccessibleMemory and onlyAccessesInaccessibleMemOrArgMem would have to be changed as well. Kinda unfortunate in that things like `llvm.assume` go from modelling a control dependence to doing an arbitrary read.


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

https://reviews.llvm.org/D127383



More information about the llvm-commits mailing list