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 @@ -56,6 +56,11 @@ /// The name of an operation is the key identifier for it. OperationName getName() { return name; } + // The name of an operation without the dialect name stripped. + StringRef getNameWithoutDialect() { + return name.getStringRef().split(".").second; + } + /// If this operation has a registered operation description, return it. /// Otherwise return null. const AbstractOperation *getAbstractOperation() {