[PATCH] D49822: [GlobalMerge] Allow merging globals with explicit section markings.

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 14:33:15 PDT 2018


greened added inline comments.


================
Comment at: lib/CodeGen/GlobalMerge.cpp:466
+      if (Globals[j]->hasSection() && Globals[j]->getAlignment())
+        Align = Globals[j]->getAlignment();
       unsigned Padding = alignTo(MergedSize, Align) - MergedSize;
----------------
greened wrote:
> Comment here about why this overrides getPreferredAlignment?
Or more specifically, why this overrides getPreferredAlignent only if it has a section but not otherwise.


Repository:
  rL LLVM

https://reviews.llvm.org/D49822





More information about the llvm-commits mailing list