[PATCH] D122123: [WebAssembly][NFC] Delete type checking logic for removed ref.null instruction

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 02:55:52 PDT 2022


asb created this revision.
asb added a reviewer: pmatos.
Herald added subscribers: ecnelises, sameer.abuasal, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
asb requested review of this revision.
Herald added a subscriber: aheejin.
Herald added a project: LLVM.

D114979 <https://reviews.llvm.org/D114979> changed the textual formal of ref.null - dropping ref.null in favour of ref.null_extern and ref.null_func. Therefore, the type checker no longer needs logic to handle "ref.null".


https://reviews.llvm.org/D122123

Files:
  llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp


Index: llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
+++ llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp
@@ -303,9 +303,6 @@
     // catch instruction pushes values whose types are specified in the tag's
     // "params" part
     Stack.insert(Stack.end(), Sig->Params.begin(), Sig->Params.end());
-  } else if (Name == "ref.null") {
-    auto VT = static_cast<wasm::ValType>(Inst.getOperand(0).getImm());
-    Stack.push_back(VT);
   } else if (Name == "unreachable") {
     Unreachable = true;
   } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122123.416872.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220321/4d477fe2/attachment.bin>


More information about the llvm-commits mailing list