[PATCH] D146781: [Webassembly] consider invalid CALL_S in removeRegisterOperands

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 12:42:22 PDT 2023


aheejin added a comment.

In D146781#4227396 <https://reviews.llvm.org/D146781#4227396>, @HerrCai0907 wrote:

> detail fix see https://reviews.llvm.org/D147033, only add assert in this patch to avoid further spread of errors

I'm not sure it makes much sense to only check about `CALL`s condition at the end of the pipeline. If we want to do that, we should be doing check for all instruction, which is equivalent to running a checker. We have a type checker <https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp>, but this is to ensure the validity of assembly files we parse. If we emit an invalid instruction and something crashes at the end, I think that means we should be fixing the bug that emitted the invalid instruction, rather than asserting for a single instruction here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146781



More information about the llvm-commits mailing list