[all-commits] [llvm/llvm-project] 1bd1a4: [WebAssembly] Use intrinsics for table.get/set ins...

Paulo Matos via All-commits all-commits at lists.llvm.org
Tue Sep 27 00:17:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bd1a4407058c4a159eee6f6956f3bcabeb0d7f8
      https://github.com/llvm/llvm-project/commit/1bd1a4407058c4a159eee6f6956f3bcabeb0d7f8
  Author: Paulo Matos <pmatos at igalia.com>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsWebAssembly.td
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyInstrTable.td
    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

  Log Message:
  -----------
  [WebAssembly] Use intrinsics for table.get/set instructions

Initial table.get/set implementation would match and lower combinations
of GEP+load/store to table.get/set instructions. However, this is error
prone due to potential combinations of GEP+load/store we don't implement,
and load/store optimizations. By changing the code to using intrinsics, we
 avoid both issues and simplify the code.

New builtins implemented:
* @llvm.wasm.table.get.externref
* @llvm.wasm.table.get.funcref
* @llvm.wasm.table.set.externref
* @llvm.wasm.table.set.funcref

Reviewed By: asb, tlively

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




More information about the All-commits mailing list