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

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 11:10:15 PDT 2022


rjmccall added a comment.

Right.  In order to get back to having this optimization power even within unsplit coroutines, we have to start modeling the effect of being dependent on the identity of current thread.  That effect includes reading the current thread ID, taking the address of thread-local memory, etc.  And the right way to do that is to add a `nothreadid` attribute (or however we decide to spell it) that calls can affirmatively say they have.  Once we have that in the IR, we can also talk about having a language feature that lowers to it (e.g. an attribute stronger than `__attribute__((const))`).


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

https://reviews.llvm.org/D127383



More information about the llvm-commits mailing list