[PATCH] D130290: [MachineVerifier] add checks for INLINEASM_BR
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 16:08:14 PDT 2022
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:904
+ report("INLINEASM_BR indirect target predecessor list missing parent",
+ &MO, i);
+ }
----------------
efriedma wrote:
> nickdesaulniers wrote:
> > efriedma wrote:
> > > I don't think you need to check both isSuccessor and isPredecessor; we should have other checks that verify the predecessor lists are consistent with the successor lists.
> > If you comment out these checks, then run `llc -run-pass=none -verify-machineinstrs /android0/llvm-project/llvm/test/MachineVerifier/verify-inlineasmbr.mir -o -`, you'll find that MachineVerify makes not such qualms about inconsistent predecessor or successor lists, despite BOTH being wrong.
> All I'm trying to say is that if you try to construct a testcase where the isSuccessor check succeeds, but the isPredecessor check fails, you'll get some other error.
I suspect the verifier will spot other things wrong later during its analysis, but if either list is corrupt, I feel strongly that we should eagerly diagnose that ASAP. It makes for a significantly improved debugging experience if the verifier spots corrupted pred/succ lists ASAP.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130290/new/
https://reviews.llvm.org/D130290
More information about the llvm-commits
mailing list