diff options
author | Nikita Popov <npopov@redhat.com> | 2025-04-02 16:40:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 10:40:53 +0200 |
commit | 9356091a98c24718572f99b51553838ed664b67a (patch) | |
tree | c477fdc48374c66572cbda9cec4ab5bcd2dd74d1 /llvm/lib/CodeGen/GlobalMerge.cpp | |
parent | 10c6ebc42711fa12ff790f3462cbce0e02538ab7 (diff) | |
download | llvm-9356091a98c24718572f99b51553838ed664b67a.zip llvm-9356091a98c24718572f99b51553838ed664b67a.tar.gz llvm-9356091a98c24718572f99b51553838ed664b67a.tar.bz2 |
[GlobalMerge][PPC] Don't merge globals in llvm.metadata section (#131801)
The llvm.metadata section is not emitted and has special semantics. We
should not merge globals in it, similarly to how we already skip merging
of `llvm.xyz` globals.
Fixes https://github.com/llvm/llvm-project/issues/131394.
Diffstat (limited to 'llvm/lib/CodeGen/GlobalMerge.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalMerge.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp index d0918ac..e58d7e34 100644 --- a/llvm/lib/CodeGen/GlobalMerge.cpp +++ b/llvm/lib/CodeGen/GlobalMerge.cpp @@ -713,7 +713,8 @@ bool GlobalMergeImpl::run(Module &M) { continue; // Ignore all 'special' globals. - if (GV.getName().starts_with("llvm.") || GV.getName().starts_with(".llvm.")) + if (GV.getName().starts_with("llvm.") || + GV.getName().starts_with(".llvm.") || Section == "llvm.metadata") continue; // Ignore all "required" globals: |