[PATCH] D104420: thread_local support for AIX

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 11 17:29:49 PDT 2021


hubert.reinterpretcast added inline comments.


================
Comment at: clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp:13
 // LINUX: @_ZTH1r ={{.*}} alias void (), void ()* @__tls_init
+// AIXX: @_ZTH1r ={{.*}} alias void (), void ()* @__tls_init
 // DARWIN: @_ZTH1r = internal alias void (), void ()* @__tls_init
----------------
Fix typo. Also, if the Linux and the AIX pattern is the same, adding a `NONDARWIN` prefix could help.


================
Comment at: clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp:28-29
 
 // LINUX: define weak_odr hidden i32* @_ZTW1r() [[ATTR0:#[0-9]+]] comdat {
+// AIX: define weak_odr hidden i32* @_ZTW1r() [[ATTR0:#[0-9]+]] {
 // DARWIN: define cxx_fast_tlscc i32* @_ZTW1r() [[ATTR1:#[0-9]+]] {
----------------
Can use `{{.*}}` in place of `comdat ` to common up the Linux and the AIX pattern.


================
Comment at: clang/test/CodeGenCXX/cxx11-thread-local.cpp:12
 // RUN: %clang_cc1 -std=c++11 -fno-use-cxa-atexit -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefix=CHECK --check-prefix=AIX %s
 
----------------
Minor nit: I think this should be moved to after line 5.


================
Comment at: clang/test/CodeGenCXX/cxx11-thread-local.cpp:18
 // LINUX-DAG: @a ={{.*}} thread_local global i32 0
+// AIX-DAG: @a ={{.*}} thread_local global i32 0
 // DARWIN-DAG: @a = internal thread_local global i32 0
----------------
Same comment as for the earlier file re: adding a prefix to handle the common Linux and AIX lines.


================
Comment at: clang/test/CodeGenCXX/cxx11-thread-local.cpp:229
 // LINUX: define linkonce_odr hidden i32* @_ZTWN1VIcE1mE() {{#[0-9]+}} comdat {
+// AIX: define linkonce_odr hidden i32* @_ZTWN1VIcE1mE() {{#[0-9]+}} {
 // LINUX: br i1 icmp ne (void ()* @_ZTHN1VIcE1mE,
----------------
Same comment as earlier about `comdat`.


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

https://reviews.llvm.org/D104420



More information about the cfe-commits mailing list