[PATCH] D127383: Don't treat readnone call in presplit coroutine as not access memory
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 01:23:32 PDT 2022
nikic added a comment.
Compile-time impact is low / acceptable: http://llvm-compile-time-tracker.com/compare.php?from=40a4078e14c2c6c5e2d0a1776285aa7491e791b3&to=d753f388d52778fff19b5a6d82a5b9c4869a4273&stat=instructions
I'm fine with this change, but I didn't follow the original discussion.
================
Comment at: llvm/docs/LangRef.rst:1943
+
+ Note that the readnone calls may access ``thread-id`` in a presplit coroutine.
``readonly``
----------------
Drop "the"
================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:778-780
+ if (Call->hasFnAttr(Attribute::ReadNone) &&
+ Call->getFunction()->isPresplitCoroutine())
+ return FMRB_OnlyReadsMemory;
----------------
ChuanqiXu wrote:
> This early return is necessary otherwise it would fall to the combine operation at line 804, which would return FMRB_DoesNotAccessMemory.
You mean the getModRefBehavior call on the function below? I think it may be better to guard that call instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127383/new/
https://reviews.llvm.org/D127383
More information about the llvm-commits
mailing list