[llvm] [GlobalMerge] Update the GlobalMerge pass to merge private global variables. (PR #101222)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 12:39:53 PDT 2024


================
@@ -664,7 +664,7 @@ bool GlobalMergeImpl::run(Module &M) {
       continue;
 
     if (!(Opt.MergeExternal && GV.hasExternalLinkage()) &&
-        !GV.hasInternalLinkage())
+        !GV.hasInternalLinkage() && !GV.hasPrivateLinkage())
----------------
nikic wrote:

```suggestion
        !GV.hasLocalLinkage())
```

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


More information about the llvm-commits mailing list