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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 11:30:37 PDT 2022


efriedma added a comment.

> It seems like we should at least have a way to mark functions we know don't access thread ids, rather than updating code to account for the fact that read none intrinsics now are considered may-read in some circumstances.

The overall plan involves adding a "nothreadid" attribute (name subject to bikeshedding) at some point.  But it was left out of the initial patch, since it's not critical for correctness.

> I have not been through all the previous discussion, but from the langref changes the new behavior of doesNotAccessMemory & co is not very clear to me. The langref change specifically calls out reading the id of the current thread being not considered reading memory. But doesNotAccessMemory seems to consider it accessing memory in Coro-split functions? Shouldn't the LangRef's definition at least clearly call out the interaction with the presplitcoroutine attribute?

https://discourse.llvm.org/t/address-thread-identification-problems-with-coroutine/62015/48 is a summary of the overall design here. I'd suggest reading the rest of the discussion if you want more context... it's hard to summarize the discussion, but we concluded this was the least disruptive solution.

It might be worth explicitly calling out the interaction with coroutines more explicitly in LangRef, sure.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127383



More information about the llvm-commits mailing list