[PATCH] D151774: [LICM] Don't hoist threadlocals within presplit coroutines

Fedir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 11:29:11 PDT 2023


fplk added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1240
       return true;
     if (Behavior.onlyReadsMemory()) {
       // A readonly argmemonly function only reads from memory pointed to by
----------------
I'm wondering if the new check could be unified with this check to simplify code; they both seem to check for onlyReadsMemory. I didn't double-check yet, but from the naming it seems that onlyReadsMemory and doesNotAccessMemory are mutually exclusive so we can safely move the check to below.


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

https://reviews.llvm.org/D151774



More information about the llvm-commits mailing list