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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 02:51:14 PDT 2022


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Analysis/GlobalsModRef.cpp:270
+            // Since a coroutine might resume in different threads.
+            !Call->getFunction()->isPresplitCoroutine())
           Min = FMRB_DoesNotAccessMemory;
----------------
ChuanqiXu wrote:
> nikic wrote:
> > I've taken the liberty of deleting this whole function in https://github.com/llvm/llvm-project/commit/4a579abd9f95bf9fda920759aced3874d04c5b9e. This was unnecessary code duplication with BasicAA.
> This might not be right. After the patch, when I call GlobalsAAResult::getModRefBehavior(CallBase*), it would call https://github.com/llvm/llvm-project/blob/519d7876cbee5a5d3cd40d41525cd45e44fb07a8/llvm/include/llvm/Analysis/AliasAnalysis.h#L1236-L1238 all the time, which is not correct.
I think we could improve the original implementation. I thought it would call BasicAAResult::getModRefBehavior(CallBase*) too.


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

https://reviews.llvm.org/D127383



More information about the llvm-commits mailing list