[mlir] Making verification after parsing optional
This is very useful when you want to parse IR even if its invalid (e.g. bytecode). It's also useful if you don't want to pay the cost of verification in certain situations. Differential Revision: https://reviews.llvm.org/D134847
This commit is contained in:
@@ -1408,7 +1408,7 @@ LogicalResult BytecodeReader::parseIRSection(ArrayRef<uint8_t> sectionData,
|
||||
}
|
||||
|
||||
// Verify that the parsed operations are valid.
|
||||
if (failed(verify(*moduleOp)))
|
||||
if (config.shouldVerifyAfterParse() && failed(verify(*moduleOp)))
|
||||
return failure();
|
||||
|
||||
// Splice the parsed operations over to the provided top-level block.
|
||||
|
||||
Reference in New Issue
Block a user