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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 22:44:28 PDT 2022


ChuanqiXu marked an inline comment as done.
ChuanqiXu added a comment.

In D125291#3651640 <https://reviews.llvm.org/D125291#3651640>, @nhaehnle wrote:

> I can't judge the Clang changes.

Now the clang part is moved to D129833 <https://reviews.llvm.org/D129833>.

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

I don't understand it a lot since I lack experience in the backend. I've implemented it in SelectionDAG. And it looks redundant to implement it again in GlobalISel. May you explain it?



================
Comment at: llvm/docs/LangRef.rst:24541
+
+      declare ptr @llvm.threadlocal.address(ptr) nounwind readnone willreturn
+
----------------
ychen wrote:
> Like @jyknight already did, any idea what it would take to change the parameter type from pointer to token? Looking at the test changes, it looks like OpenMP is impacted a lot. I suggest splitting this patch into Clang and LLVM parts to gain insights from the frontend experts.
The change for OpenMP is relatively large since they used utils/update_cc_test_checks.py to update their tests automatically.

I've split the clang part into https://reviews.llvm.org/D129833


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

https://reviews.llvm.org/D125291



More information about the llvm-commits mailing list