[PATCH] D16145: Stop increasing alignment of externally-visible globals on ELF platforms.

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 14:20:54 PST 2016


dim accepted this revision.
dim added a comment.
This revision is now accepted and ready to land.

LGTM.  The assembly output of the cout-align.cpp sample, compiled before and after this change:

  --- cout-align-r257663-before.s 2016-01-13 23:09:24.266652000 +0100
  +++ cout-align-r257663-after.s  2016-01-13 22:17:26.781312000 +0100
  @@ -19,7 +19,7 @@ _Z7do_initv:
          movl    $_ZTV1BIciE+24, %eax
          movd    %rax, %xmm1
          punpcklqdq      %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
  -       movdqa  %xmm1, cout(%rip)
  +       movdqu  %xmm1, cout(%rip)
          popq    %rbp
          retq
   .Lfunc_end0:
  @@ -205,7 +205,7 @@ GCC_except_table4:
          .type   cout, at object            # @cout
          .bss
          .globl  cout
  -       .align  16
  +       .align  8
   cout:
          .zero   24
          .size   cout, 24


================
Comment at: include/llvm/IR/GlobalValue.h:349
@@ -348,1 +348,3 @@
 
+  // Returns true if the alignment of the value can be unilateraly
+  // increased.
----------------
s/unilateraly/unilaterally/


http://reviews.llvm.org/D16145





More information about the llvm-commits mailing list