[PATCH] D92661: [RFC] Fix TLS and Coroutine
Xun Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 10:08:37 PST 2020
lxfind added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:1309
+// Intrinsic to obtain the address of a thread_local variable.
+def int_threadlocal : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty]>;
+
----------------
hoy wrote:
> hoy wrote:
> > With the intrinsic, can TLS variable reference in the same coroutine or regular routine be DCE-ed anymore?
> Sorry, I meant CSE-ed.
Since the intrinsics does not have readnone attribute, it won't be CSE-ed before CoroSplit.
However after CoroSplit, it will be lowered back to the direct reference of the TLS, and will be CSE-ed by latter passes.
I can add a test function to demonstrate that too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92661/new/
https://reviews.llvm.org/D92661
More information about the cfe-commits
mailing list