[PATCH] D79793: Simplify MachineVerifier's block-successor verification.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 13:03:56 PDT 2020


jyknight marked an inline comment as done.
jyknight added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/eh-labels.mir:32
     EH_LABEL <mcsymbol .Ltmp1>
+    BR %bb.2, implicit-def dead $arguments
 
----------------
aheejin wrote:
> In this case, the next BB is an EH pad where we unwind to in case `@foo` throws, so the bb.2 becomes a fallthrough. Does this patch not handle this case?
Sorry, I don't follow. There's no magic behavior of "just skip over ehpad blocks and fallthrough into the next block after it."

bb.0 says it falls through into bb.2, but the instruction stream and block layout shows a fall-through into bb.1. That's now properly detected as invalid by the verifier, but was missed before.

Normally, blocks would be placed, so as not to have EHPad blocks in the middle of a potential fallthrough (e.g. moving bb.1 to the end of the function), but given the block placement specified in this test, there should be an explicit jump around the ehpad block.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79793





More information about the llvm-commits mailing list