[PATCH] D104420: thread_local support for AIX

2021-07-19 Thread Jamie Schmeiser via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG73840f9f8141: thread_local support for AIX (authored by jamieschmeiser). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D104420: thread_local support for AIX

2021-07-16 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM; thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 _

[PATCH] D104420: thread_local support for AIX

2021-07-16 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 359336. jamieschmeiser added a comment. Respond to review comments: Change parameter name and tighten up conditions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/CGDec

[PATCH] D104420: thread_local support for AIX

2021-07-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I think we're good after some last updates. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:340-342 + // Ignore all attributes except ConstInit when IgnoreAttrs is true. + bool isEmittedWithConstantInitializer(const VarDecl *VD, +

[PATCH] D104420: thread_local support for AIX

2021-07-15 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358974. jamieschmeiser added a comment. Respond to review comments, formatting: fix comments, add assertion, fix linkage, expand test to include body of generated function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://rev

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/CGDeclCXX.cpp:265 +/// Create a stub function, suitable for being passed to atexit, +/// which passes the given address to the given destructor function. Since the function has some spe

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358717. jamieschmeiser added a comment. Remove accidental inclusion CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenFunction.h c

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2971 +isEmittedWithConstantInitializer(VD, true) && +!VD->needsDestruction(getContext())) { + // Emit a weak global function referring to the initialization function. --

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358690. jamieschmeiser added a comment. Respond to review comments: update comments and make functions not weak CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/CGDeclCXX.c

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 358673. jamieschmeiser added a comment. Respond to review comments: create stub functions, return 0 from function and other fixes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/

[PATCH] D104420: thread_local support for AIX

2021-07-14 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2971 +isEmittedWithConstantInitializer(VD, true) && +!VD->needsDestruction(getContext())) { + // Emit a weak global function referring to the initialization function

[PATCH] D104420: thread_local support for AIX

2021-07-13 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2966 +// other TUs will not know whether the initialization routine exists +// so create a weak, empty, init function to satisfy the linker. +// This is needed whenever a thr

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:3004 +} else if (CGM.getTriple().isOSAIX()) + // On AIX, all thread_local vars will have init routines regardless of + // whether they are const-initialized or not. Since

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:3003-3010 +} else if (CGM.getTriple().isOSAIX()) + // On AIX, all thread_local vars will have init routines regardless of + // whether they are const-initialized or not. S

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:4790 +llvm::Value *Arg2 = llvm::ConstantExpr::getBitCast( +cast(dtor.getCallee()), FpTy); +CGF.EmitNounwindRuntimeCall(AtExit, {Arg1, Arg2}); The functio

[PATCH] D104420: thread_local support for AIX

2021-07-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 357970. jamieschmeiser added a comment. Respond to review comments: Update to tests to create common LINUX/AIX portions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/

[PATCH] D104420: thread_local support for AIX

2021-07-11 Thread Hubert Tong via Phabricator via cfe-commits
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 vo

[PATCH] D104420: thread_local support for AIX

2021-07-06 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser updated this revision to Diff 356705. jamieschmeiser added a comment. Fix formatting problem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104420/new/ https://reviews.llvm.org/D104420 Files: clang/lib/CodeGen/ItaniumCXXABI.cpp clang/test/CodeGenCXX/cxx11-thread-loca

[PATCH] D104420: thread_local support for AIX

2021-06-16 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser created this revision. jamieschmeiser added reviewers: hubert.reinterpretcast, sfertile, cebowleratibm, DiggerLin, rsmith. jamieschmeiser requested review of this revision. Herald added a project: clang. Changes to support thread_local storage on AIX. The AIX linker will p