[llvm] [PowerPC] Do not merge TLS constants within PPCMergeStringPool.cpp (PR #94059)
Lei Huang via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 08:22:44 PDT 2024
================
@@ -215,6 +215,11 @@ void PPCMergeStringPool::collectCandidateConstants(Module &M) {
Global.getLinkage() != GlobalValue::InternalLinkage)
continue;
+ // Do not pool thread-local constants, as the pooled strings can contain
+ // non-thread-local constants, and these should not be mixed together.
+ if (Global.isThreadLocal())
+ continue;
+
----------------
lei137 wrote:
Can we combine this conditon to the top exit condtion at line 174? So that would change the doc on line 173 to:
```
// We can only pool non-thread-local constants.
```
https://github.com/llvm/llvm-project/pull/94059
More information about the llvm-commits
mailing list