[mlir][llvm] Improve LLVM IR import error handling.
authorTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 9 Dec 2022 12:40:18 +0000 (14:40 +0200)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 9 Dec 2022 12:42:09 +0000 (14:42 +0200)
commit38e87e8af47ac77a0f6079ed3aa76f9bc54f73f3
treeb8253a304cbf093cd83a9abe8461ae9cd068b85b
parent77ab7281aa36800dc77dab07bd40e6e0fd9f0b78
[mlir][llvm] Improve LLVM IR import error handling.

Instead of exiting in the middle of the import handle errors more
gracefully by printing an error message and returning failure. The
revision handles and tests the import of unsupported instructions,
values, constants, and intrinsics.

Depends on D139404

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D139405
mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/test/Target/LLVMIR/Import/import-failure.ll [new file with mode: 0644]
mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp