diff --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h --- a/mlir/include/mlir/IR/OpDefinition.h +++ b/mlir/include/mlir/IR/OpDefinition.h @@ -1023,6 +1023,8 @@ "expected operation to take one operand"); static_assert(ConcreteType::template hasTrait(), "expected operation to preserve type"); + // Involution requires the operation to be side effect free as well + // but currently this check is under a FIXME and is not actually done. return impl::verifyIsInvolution(op); } diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp --- a/mlir/lib/IR/Operation.cpp +++ b/mlir/lib/IR/Operation.cpp @@ -732,8 +732,10 @@ } LogicalResult OpTrait::impl::verifyIsInvolution(Operation *op) { - if (!MemoryEffectOpInterface::hasNoEffect(op)) - return op->emitOpError() << "requires operation to have no side effects"; + // FIXME: Add back check for no side effects on operation. + // Currently adding it would cause the shared library build + // to fail since there would be a dependency of IR on SideEffectInterfaces + // which is cyclical. return success(); }