[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 23:06:49 PDT 2022


rjmccall added a comment.

Stackful coroutine bodies should be straightforward to support on top of the other work you've been doing, if anyone's actually interested in pursuing them.  As far as the optimizer needs to know, a stackful coroutine function is just like a presplit stackless coroutine except that calls and returns work normally and it's never split.  Because it's never split, the backends would need to understand that they can't arbitrarily reorder TLS materializations and so on in those functions, which would probably be the most complicated piece of work there.  Otherwise, I think we'd just need to mark stackful coroutine bodies with some new attribute and then change `cannotReadDifferentThreadIDIfMoved` to check for that, the same way it checks for presplit stackless coroutines.


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

https://reviews.llvm.org/D132352



More information about the llvm-commits mailing list