[PATCH] D114979: [WebAssembly] Implementation of intrinsic for ref.null and HeapType removal

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 2 11:43:47 PST 2021


pmatos created this revision.
pmatos added a reviewer: tlively.
Herald added subscribers: dexonsmith, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
pmatos requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert, aheejin.
Herald added a project: LLVM.

This patch implements the intrinsic for ref.null.
In the process of implementing int_wasm_ref_null_func() and
int_wasm_ref_null_extern() intrinsics, it removes the redundant
HeapType.

This also causes the textual assembler syntax for ref.null to
change. Instead of receiving an argument: `func` or `extern`, the
instruction mnemonic is either ref.null_func or ref.null_extern,
without the need for a further operand.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114979

Files:
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/IntrinsicsWebAssembly.td
  llvm/lib/IR/Function.cpp
  llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
  llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
  llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
  llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.h
  llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp
  llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
  llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.cpp
  llvm/lib/Target/WebAssembly/Utils/WebAssemblyTypeUtilities.h
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
  llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
  llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
  llvm/test/CodeGen/WebAssembly/funcref-call.ll
  llvm/test/CodeGen/WebAssembly/funcref-table_call.ll
  llvm/test/CodeGen/WebAssembly/ref-null.ll
  llvm/test/MC/WebAssembly/reference-types.s
  llvm/utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114979.391411.patch
Type: text/x-patch
Size: 20611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211202/c682b743/attachment.bin>


More information about the llvm-commits mailing list