[Mlir-commits] [mlir] [mlir] Add `convertInstruction` and `getSupportedInstructions` to `LLVMImportInterface` (PR #86799)
Fabian Mora
llvmlistbot at llvm.org
Wed Mar 27 11:19:03 PDT 2024
================
@@ -100,9 +114,27 @@ class LLVMImportInterface
*it, iface.getDialect()->getNamespace(),
intrinsicToDialect.lookup(*it)->getNamespace()));
}
+ const auto *instIt =
+ llvm::find_if(iface.getSupportedInstructions(), [&](unsigned id) {
+ return instructionToDialect.count(id);
+ });
+ if (instIt != iface.getSupportedInstructions().end()) {
+ return emitError(
+ UnknownLoc::get(iface.getContext()),
+ llvm::formatv(
+ "expected unique conversion for instruction ({0}), but "
+ "got conflicting {1} and {2} conversions",
+ *it, iface.getDialect()->getNamespace(),
+ instructionToDialect.lookup(*it)
----------------
fabianmcg wrote:
I changed them to `intrinsicIt` and `instructionIt`, as `instIt` was already in use.
https://github.com/llvm/llvm-project/pull/86799
More information about the Mlir-commits
mailing list