[mlir] Fix verification order of nested ops.
authorChia-hung Duan <chiahungduan@google.com>
Fri, 15 Apr 2022 04:33:40 +0000 (04:33 +0000)
committerChia-hung Duan <chiahungduan@google.com>
Fri, 15 Apr 2022 04:41:10 +0000 (04:41 +0000)
commit5232c5c5d41489a07d0e72a0e87229a58950f94a
tree8b00cb3e0e4083279fb74d656f61d6882001b442
parent90a17ef6cc3451945d7f3c40a0a9b5ab1b3a26e5
[mlir] Fix verification order of nested ops.

In order to increase parallism, certain ops with regions and have the
IsIsolatedFromAbove trait will have their verification delayed. That
means the region verifier may access the invalid ops and may lead to a
crash.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D122771
mlir/lib/IR/Verifier.cpp
mlir/test/Dialect/Func/invalid.mlir
mlir/test/Dialect/MemRef/invalid.mlir
mlir/test/IR/invalid.mlir
mlir/test/IR/test-verification-order.mlir [new file with mode: 0644]
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestOps.td