[PATCH] D100944: [CodeGen][ELF] Emit separate unique sections for different flags

Tomas Matheson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 04:41:26 PDT 2021


tmatheson created this revision.
Herald added subscribers: pengfei, atanasyan, jrtc27, hiraditya, sdardis.
tmatheson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently when multiple sections with different flags are implicitly
created in IR (for example, a read-only and writable values in the same
section) they are emitted in the same section with the flags of the
first one seen. Instead, add flags to the ELFUniqueIDMap so that unique
sections are emitted for each set of flags.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100944

Files:
  llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  llvm/include/llvm/MC/MCContext.h
  llvm/include/llvm/MC/MCObjectFileInfo.h
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/MC/MCContext.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/test/CodeGen/Generic/elf-unique-sections-by-flags.ll
  llvm/test/CodeGen/Mips/gpopt-explict-section.ll
  llvm/test/CodeGen/X86/elf-associated.ll
  llvm/test/CodeGen/X86/explicit-section-mergeable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100944.339185.patch
Type: text/x-patch
Size: 25330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/d7317afd/attachment.bin>


More information about the llvm-commits mailing list