[PATCH] D125291: Introduce @llvm.threadlocal.address intrinsic to access TLS variable

Nicolai Hähnle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 05:38:10 PDT 2022


nhaehnle added a comment.

I can't judge the Clang changes.

On the LLVM side, can you also add the implementation and a test for the GlobalISel path? Plus, I have some minor inline comments.



================
Comment at: llvm/docs/LangRef.rst:24546
+
+The first argument is pointer, which refers to a thread local variable.
+
----------------
The first argument is **a** pointer


================
Comment at: llvm/docs/LangRef.rst:24551-24553
+The LLVM treated the address of thread local variable as a constant expression.
+But it is not true. The ``llvm.threadlocal.address`` intrinsic would represent
+the address of the thread local variable.
----------------
LangRef should focus on how IR **is** defined, not the historical evolution. I think everything that needs to be said here is actually already said in the Semantics section.


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

https://reviews.llvm.org/D125291



More information about the cfe-commits mailing list