[all-commits] [llvm/llvm-project] 6ae7b4: Set alignment of .llvmbc and .llvmcmd to 1

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Aug 29 18:28:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ae7b403c3e1aebcb825d3dd4777d3c1149d6d67
      https://github.com/llvm/llvm-project/commit/6ae7b403c3e1aebcb825d3dd4777d3c1149d6d67
  Author: Fangrui Song <i at maskray.me>
  Date:   2020-08-29 (Sat, 29 Aug 2020)

  Changed paths:
    M clang/test/Frontend/embed-bitcode.ll
    M clang/test/Frontend/x86-embed-bitcode.ll
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/test/CodeGen/X86/embed-bitcode.ll

  Log Message:
  -----------
  Set alignment of .llvmbc and .llvmcmd to 1

Otherwise their alignment is dependent on the size of the section.  If the size
is large than 16, the alignment will be 16.

16 is a bad choice for both .llvmbc and .llvmcmd because the padding between two
contributions from input sections is of a variable size.

A bitstream is actually guaranteed to be 4-byte aligned, but consumers don't
need this property.




More information about the All-commits mailing list