[PATCH] D49646: [COFF] Use comdat shared constants for MinGW as well

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 21 22:44:11 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: rnk, majnemer, compnerd, smeenai, mgrang, ssijaric.
Herald added a reviewer: javed.absar.

GNU binutils tools have no problems with this kind of shared constants, provided that we actually hook it up completely in AsmPrinter and
produce a global symbol.

This effectively reverts SVN r335918 by hooking the rest of it up properly.

This feature was implemented originally in SVN r213006, with no reason for why it can't be used for MinGW other than the fact that GCC doesn't
do it while MSVC does.

This goes on top of https://reviews.llvm.org/D49645 (which clarifies the current code). If both go in at once, they can be squashed, avoiding adding the flag that is removed directly afterwards again.

@majnemer Or was there any specific reason not to do this for all windows targets?


Repository:
  rL LLVM

https://reviews.llvm.org/D49646

Files:
  include/llvm/MC/MCAsmInfo.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  lib/MC/MCAsmInfoCOFF.cpp
  test/CodeGen/AArch64/win_cst_pool.ll
  test/CodeGen/X86/win_cst_pool.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49646.156703.patch
Type: text/x-patch
Size: 5558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180722/447dc215/attachment.bin>


More information about the llvm-commits mailing list