[PATCH] D101736: [WebAssembly] Allow DBG_VALUE after terminator in MachineVerifier

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 3 15:31:32 PDT 2021


dschuff added a comment.

Is throw also a terminator?



================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:803
+  // DBG_VALUE $noreg, $noreg, !"variable", ...
+  if (TM->getTargetTriple().isWasm() && FirstTerminator && MI->isDebugValue() &&
+      MI->getOperand(0).isReg() && MI->getOperand(1).isReg() &&
----------------
I guess the inclusion of `FirstTerminator` means that if there is a `br_if` followed by a `br` or whatever, then we only allow DBG_VALUE after the `br_if` which makes sense.
Would this miss the case where there is only one terminator (i.e. just a `br`, in which case it would also be the first terminator), or is `FirstTerminator` not set in that case?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101736



More information about the llvm-commits mailing list