[all-commits] [llvm/llvm-project] 00bf47: [WebAssembly] Refactor and fix emission of externa...

Paulo Matos via All-commits all-commits at lists.llvm.org
Mon Jan 31 02:42:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00bf4755e90c89963a135739218ef49c2417109f
      https://github.com/llvm/llvm-project/commit/00bf4755e90c89963a135739218ef49c2417109f
  Author: Paulo Matos <pmatos at igalia.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
    M llvm/lib/Target/WebAssembly/WebAssemblyMCLowerPrePass.cpp
    M llvm/test/CodeGen/WebAssembly/externref-tableget.ll
    M llvm/test/CodeGen/WebAssembly/externref-tableset.ll
    M llvm/test/CodeGen/WebAssembly/funcref-table_call.ll
    M llvm/test/CodeGen/WebAssembly/funcref-tableget.ll
    M llvm/test/CodeGen/WebAssembly/funcref-tableset.ll
    M llvm/test/CodeGen/WebAssembly/global-get.ll
    M llvm/test/CodeGen/WebAssembly/global-set.ll
    A llvm/test/CodeGen/WebAssembly/table-types.ll
    M llvm/test/MC/WebAssembly/assembler-binary.ll
    M llvm/test/MC/WebAssembly/stack-ptr-mclower.ll

  Log Message:
  -----------
  [WebAssembly] Refactor and fix emission of external IR global decls

This patches fixes the visibility and linkage information of symbols
referring to IR globals.

Emission of external declarations is now done in the first execution
of emitConstantPool rather than in emitLinkage (and a few other
places). This is the point where we have already gathered information
about used symbols (by running the MC Lower PrePass) and not yet
started emitting any functions so that any declarations that need to
be emitted are done so at the top of the file before any functions.

This changes the order of a few directives in the final asm file which
required an update to a few tests.

Reviewed By: sbc100

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




More information about the All-commits mailing list