diff --git a/mlir/include/mlir/IR/Operation.h b/mlir/include/mlir/IR/Operation.h --- a/mlir/include/mlir/IR/Operation.h +++ b/mlir/include/mlir/IR/Operation.h @@ -811,6 +811,11 @@ } }; +/// Allow isa on operations. +template <> struct isa_impl<::mlir::Operation *, ::mlir::Operation> { + static inline bool doit(const ::mlir::Operation &op) { return true; } +}; + /// Provide specializations for operation casts as the resulting T is value /// typed. template struct cast_retty_impl {