[PATCH] D96931: [LTO] Discard non-prevailing defined symbols in module-level assembly

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 20:36:25 PST 2021


ychen created this revision.
ychen added reviewers: tejohnson, pcc, MaskRay.
Herald added subscribers: kerbowa, steven_wu, hiraditya, inglorion, nhaehnle, jvesely.
ychen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

by inline assembly string replacement. The alternative is using a ad-hoc
MCStreamer and AsmParser, but it is more
expensive to do that and the use cases are very rare that makes it not
worthwhile.

The motivation is that after D90108 <https://reviews.llvm.org/D90108>, the use case demonstrated by the
test case begins to fail. I find the error message is useful hence
this patch.

The change in MachineModuleInfo.cpp is to make sure the error code 1 is
returned. Without it, the error message is printed but `llvm-lto2` still
returns 0.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96931

Files:
  llvm/lib/CodeGen/MachineModuleInfo.cpp
  llvm/lib/LTO/LTO.cpp
  llvm/test/CodeGen/AMDGPU/lds-initializer.ll
  llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll
  llvm/test/CodeGen/XCore/section-name.ll
  llvm/test/LTO/X86/weak-asm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96931.324512.patch
Type: text/x-patch
Size: 7789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210218/d2722289/attachment.bin>


More information about the llvm-commits mailing list