[PATCH] D80651: Harden MLIR detection of misconfiguration when missing dialect registration

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 27 20:44:12 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/IR/OpDefinition.h:1238
       return TypeID::get<ConcreteType>() == abstractOp->typeID;
-    return op->getName().getStringRef() == ConcreteType::getOperationName();
+    llvm_unreachable(("Can't cast to unregistered operation" +
+                      ConcreteType::getOperationName())
----------------
You will still want to check here. This path is only taken if the operation being casted is unregistered, not `ConcreteType` itself.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80651/new/

https://reviews.llvm.org/D80651





More information about the llvm-commits mailing list