[all-commits] [llvm/llvm-project] b4a8c0: [LTO][MC] Discard non-prevailing defined symbols i...

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Thu Mar 18 15:34:24 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4a8c0ebb6d49f757c687833d85f843aaeb19133
      https://github.com/llvm/llvm-project/commit/b4a8c0ebb6d49f757c687833d85f843aaeb19133
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2021-03-18 (Thu, 18 Mar 2021)

  Changed paths:
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCParser/MCAsmParser.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/MC/MCParser/ELFAsmParser.cpp
    A llvm/test/LTO/X86/inline-asm-lto-discard.ll
    A llvm/test/LTO/X86/inline-asm-lto-discard2.ll
    A llvm/test/MC/ELF/lto-discard.s

  Log Message:
  -----------
  [LTO][MC] Discard non-prevailing defined symbols in module-level assembly

This is the alternative approach to D96931.

In LTO, for each module with inlineasm block, prepend directive ".lto_discard <sym>, <sym>*" to the beginning of the inline
asm.  ".lto_discard" is both a module inlineasm block marker and (optionally) provides a list of symbols to be discarded.

In MC while emitting for inlineasm, discard symbol binding & symbol
definitions according to ".lto_disard".

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D98762




More information about the All-commits mailing list