[all-commits] [llvm/llvm-project] 861dbe: [WebAssembly] call_indirect issues table number re...

Andy Wingo via All-commits all-commits at lists.llvm.org
Mon Feb 22 01:17:23 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 861dbe1a021e6439af837b72b219fb9c449a57ae
      https://github.com/llvm/llvm-project/commit/861dbe1a021e6439af837b72b219fb9c449a57ae
  Author: Andy Wingo <wingo at igalia.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M lld/test/wasm/compress-relocs.ll
    M llvm/include/llvm/MC/MCSymbolWasm.h
    M llvm/lib/MC/WasmObjectWriter.cpp
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td
    M llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h
    M llvm/test/CodeGen/WebAssembly/function-pointer64.ll
    M llvm/test/CodeGen/WebAssembly/multivalue.ll
    M llvm/test/MC/WebAssembly/basic-assembly.s
    A llvm/test/MC/WebAssembly/call-indirect-relocs.s
    M llvm/test/MC/WebAssembly/function-alias.ll
    M llvm/test/MC/WebAssembly/reloc-code.ll
    M llvm/test/MC/WebAssembly/reloc-pic.s
    M llvm/test/MC/WebAssembly/tail-call-encodings.s
    M llvm/test/MC/WebAssembly/type-index.s
    M llvm/test/MC/WebAssembly/weak-alias.s

  Log Message:
  -----------
  [WebAssembly] call_indirect issues table number relocs

If the reference-types feature is enabled, call_indirect will explicitly
reference its corresponding function table via `TABLE_NUMBER`
relocations against a table symbol.

Also, as before, address-taken functions can also cause the function
table to be created, only with reference-types they additionally cause a
symbol table entry to be emitted.

We abuse the used-in-reloc flag on symbols to indicate which tables
should end up in the symbol table.  We do this because unfortunately
older wasm-ld will carp if it see a table symbol.

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




More information about the All-commits mailing list