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

Paulo Matos via All-commits all-commits at lists.llvm.org
Fri Feb 4 13:02:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c67c9cfe3f39141102364176bd883f74022bc133
      https://github.com/llvm/llvm-project/commit/c67c9cfe3f39141102364176bd883f74022bc133
  Author: Paulo Matos <pmatos at igalia.com>
  Date:   2022-02-04 (Fri, 04 Feb 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/only-data.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

Reland of 00bf4755.

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/D118995




More information about the All-commits mailing list