[PATCH] D120000: [1/2] TLS loads opimization (hoist)
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 05:04:54 PST 2022
nlopes added a comment.
AFAIU, you want to remove redundant calls to `__tls_get_addr at PLT`.
The question is why are these redundant? Is it because no other function (visible to compiler) can change the memory in a way that changes the result of this function?
If so, we consider this kind of functions as accessing "inaccessible memory" only. The semantics might be more complicated, I don't how TLS works.
If we are able to match a set of existing function attributes with the semantics of these TLS functions, then LLVM will remove the function calls for you.
Since I don't know enough of TLS, I can't help much. But if you describe precisely why these calls are redundant, we can tell you which attributes apply (if any).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120000/new/
https://reviews.llvm.org/D120000
More information about the llvm-commits
mailing list