[PATCH] D113420: [WebAssembly] Implement table instruction intrinsics and ref.null

Paulo Matos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 07:36:09 PST 2021


pmatos updated this revision to Diff 389494.
pmatos retitled this revision from "[WebAssembly] Implementation of intrinsics for table.fill and table.copy" to "[WebAssembly] Implement table instruction intrinsics and ref.null".
pmatos edited the summary of this revision.
pmatos added a comment.
Herald added a subscriber: jdoerfert.

After closing D111420 <https://reviews.llvm.org/D111420>, I moved the implementation of all intrinsics to this revision without the need for the polymorphic llvm_anyref_ty type.

There's a single niggle here that I haven't been able to fix and would like further comments on.

Test for reference-types.s is failing due to the parsing of `ref.null $heaptype`, be it func or extern.
The reason for this is failing is that I have removed the need to specify the input argument heaptype for the ref.null instruction. This allows me to define an intrinsic that doesn't receive an argument. If I specify a heaptype as an input argument, then TableGen really wants the argument to show up in the instruction pattern, but I would really like it to be ignored. Adding extern or func as an argument to the intrinsic just seems overcomplicated. On the other hand, I have been stuck with this for a while and would appreciate some fresh ideas.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113420/new/

https://reviews.llvm.org/D113420

Files:
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/IntrinsicsWebAssembly.td
  llvm/lib/CodeGen/ValueTypes.cpp
  llvm/lib/IR/Function.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyInstrRef.td
  llvm/lib/Target/WebAssembly/WebAssemblyInstrTable.td
  llvm/test/CodeGen/WebAssembly/funcref-call.ll
  llvm/test/CodeGen/WebAssembly/funcref-globalget.ll
  llvm/test/CodeGen/WebAssembly/funcref-globalset.ll
  llvm/test/CodeGen/WebAssembly/funcref-table_call.ll
  llvm/test/CodeGen/WebAssembly/funcref-tableget.ll
  llvm/test/CodeGen/WebAssembly/funcref-tableset.ll
  llvm/test/CodeGen/WebAssembly/ref-null.ll
  llvm/test/CodeGen/WebAssembly/table-copy.ll
  llvm/test/CodeGen/WebAssembly/table-fill.ll
  llvm/test/CodeGen/WebAssembly/table-grow.ll
  llvm/test/CodeGen/WebAssembly/table-size.ll
  llvm/utils/TableGen/IntrinsicEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113420.389494.patch
Type: text/x-patch
Size: 23548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211124/ced8a4b7/attachment.bin>


More information about the llvm-commits mailing list