[PATCH] D144877: [llvm][XCOFF] Don't seperate mergable strings by alignment

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 07:55:14 PST 2023


daltenty created this revision.
daltenty added reviewers: hubert.reinterpretcast, xingxue, stephenpeckham.
Herald added subscribers: hiraditya, nemanjai.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
daltenty requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently when we place mergable strings into a csect, we generate the name according to the size and alignment, which is something
we inherited from the ELF backend, which merges the strings in compatible sections.

However, for XCOFF, this causes problems (as seen in https://reviews.llvm.org/D134282) if a late CodeGen pass tries to update the
alignment of the global, as we emit relocations directly to this section for XCOFF. To avoid this situation and simplify things, this
change drops the alignment from the identifier, since it doesn't really serve a purpose without the accompanying linker feature.


https://reviews.llvm.org/D144877

Files:
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/test/CodeGen/PowerPC/aix-return55.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll
  llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll
  llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144877.500790.patch
Type: text/x-patch
Size: 6734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230227/79f85770/attachment.bin>


More information about the llvm-commits mailing list