[Coroutines] Don't merge readnone calls in presplit coroutines
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Mon, 17 Oct 2022 02:22:43 +0000 (10:22 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Mon, 17 Oct 2022 02:22:43 +0000 (10:22 +0800)
commit1cedc51ff5a2a4f51a4c7e8bb04bd145ac05fa50
tree77a0515e0d4c461c693dd40f955a714d166e1ebc
parentee703b5cb134d182c2b589360714feab97f6a1cc
[Coroutines] Don't  merge readnone calls in presplit coroutines

Another alternative to fix the thread identification problem in
coroutines.

We plan to fix this problem by unifying memory effecting attributes. See
https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579.
But it may be a long-term project. And it is a pity that the coroutines
can't resume in different threads for years. So this one is temporary
fix. It may cause unnecessary performance regression for coroutines. But
correctness are more important. And this one is planned to be reverted
after we are able to unify the memory effecting attributes actually.

Reviewed By: jdoerfert, rjmccall

Differential Revision: https://reviews.llvm.org/D135550
llvm/docs/ReleaseNotes.rst
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/test/Transforms/Coroutines/coro-readnone-02.ll [new file with mode: 0644]
llvm/test/Transforms/Coroutines/coro-readnone.ll [new file with mode: 0644]