[PATCH] D89711: [Coroutine] Prevent value reusing across coroutine suspensions in EarlyCSE and GVN
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 12:09:22 PDT 2020
efriedma added a comment.
> but that would also mean we would never be able to optimize out redundant pthread_self() calls
We can probably mess with alias analysis so it understands that pthread_self doesn't alias operations other than calls to a coroutine suspend; that should be enough to recover the relevant optimizations. Not sure if we want to add some sort of IR attribute, or just special-case that specific library call using TargetLibraryInfo.
> And yes thread local variables are another set of problems. I don't have a solution yet on how to handle them.
We probably need an intrinsic that computes the runtime address of a thread-local variable, so we compute the address at some specific point in the function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89711/new/
https://reviews.llvm.org/D89711
More information about the llvm-commits
mailing list