[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

Felix via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 24 18:16:18 PDT 2023


orcguru wrote:

> > The primary advantage of the local-dynamic access method is that you only make a single function call to __tls_get_mod() and use the returned pointer to get at all TLS variables. This implementation makes a function call for every variable. The only thing you've gained is a reduction in the number of TOC symbols.
> 
> The issue with duplicated calls to .__tls_get_mod is due to those pseudo TLSLDAIX nodes depending on different GVs, and CSE is not able to do dedup. I probably have to create a pseudo GV named like "_$TLSML", and use that GV for all TLSLDAIX pseudo nodes.

I tired TLSLDAIX without parameter (load module-handle is well known so the parameter is redundant), and now looks like those redundant .__tls_get_mod calls can be eliminated by optimization pass machine-cse.

https://github.com/llvm/llvm-project/pull/66316


More information about the cfe-commits mailing list