diff --git a/mlir/docs/DialectConversion.md b/mlir/docs/DialectConversion.md --- a/mlir/docs/DialectConversion.md +++ b/mlir/docs/DialectConversion.md @@ -75,6 +75,10 @@ conversion to be successful. This action also allows for selectively marking specific operations as illegal in an otherwise legal dialect. +Operations and dialects that are neither explicitly marked legal nor illegal are +separate from the above ("unknown" operations) and are treated differently for +example for the purposes of partial conversion as mentioned above. + An example conversion target is shown below: ```c++ diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -1931,7 +1931,7 @@ Operation *cstOp = rewriterImpl.createdOps[i]; if (failed(legalize(cstOp, rewriter))) { LLVM_DEBUG(logFailure(rewriterImpl.logger, - "generated constant '{0}' was illegal", + "generated constant '{0}' failed to legalize", cstOp->getName())); rewriterImpl.resetState(curState); return failure(); @@ -2106,7 +2106,7 @@ Operation *op = impl.createdOps[i]; if (failed(legalize(op, rewriter))) { LLVM_DEBUG(logFailure(impl.logger, - "generated operation '{0}'({1}) was illegal", + "generated operation '{0}'({1}) failed to legalize", op->getName(), op)); return failure(); } @@ -2120,9 +2120,9 @@ for (int i = state.numRootUpdates, e = newState.numRootUpdates; i != e; ++i) { Operation *op = impl.rootUpdates[i].getOperation(); if (failed(legalize(op, rewriter))) { - LLVM_DEBUG(logFailure(impl.logger, - "operation updated in-place '{0}' was illegal", - op->getName())); + LLVM_DEBUG(logFailure( + impl.logger, "operation updated in-place '{0}' failed to legalize", + op->getName())); return failure(); } }