[PATCH] D98762: [LTO][MC] Discard non-prevailing defined symbols in module-level assembly
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 16 23:03:55 PDT 2021
ychen created this revision.
ychen added reviewers: pcc, MaskRay, tejohnson.
Herald added subscribers: steven_wu, hiraditya, inglorion.
ychen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This is the alternative approach to D96931 <https://reviews.llvm.org/D96931>.
In LTO, for each module with inlineasm block, prepend directive ".module" and
(optioanlly) ".lto_discard <sym>, <sym>*" to the beginning of the inline
asm.
In MC while emitting for inline asm, discard symbol binding & symbol
definitions according to ".lto_disard".
PS: ".lto_discard" is not strictly required but it would the MC change
much simpler. I didn't add any standalone MC tests because the only
client for these two directives should be LTO.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98762
Files:
llvm/include/llvm/MC/MCContext.h
llvm/include/llvm/MC/MCParser/MCAsmParser.h
llvm/lib/LTO/LTO.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/lib/MC/MCParser/ELFAsmParser.cpp
llvm/test/LTO/X86/weak-asm.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98762.331165.patch
Type: text/x-patch
Size: 11031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210317/96ca7561/attachment.bin>
More information about the llvm-commits
mailing list