llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[AIX][TLS] Produce a faster local-exec access sequence for the "aix-small-tls" global variable attribute

Open amy-kwan opened this issue 1 year ago • 7 comments

Similar to 3f46e5453d9310b15d974e876f6132e3cf50c4b1, this patch allows the backend to produce a faster access sequence for the local-exec TLS model, where loading from the TOC can be avoided, for local-exec TLS variables that are annotated with the "aix-small-tls" attribute.

The expectation is for local-exec TLS variables to be set with this attribute through PGO. Furthermore, the optimized access sequence is only generated for local-exec TLS variables annotated with "aix-small-tls", only if they are less than ~32KB in size.

amy-kwan avatar Feb 26 '24 20:02 amy-kwan