[Mlir-commits] [mlir] 18669b1 - [NFC][Transform] Cleanup magic constant usage

Nicolas Vasilache llvmlistbot at llvm.org
Wed Nov 1 02:33:55 PDT 2023


Author: Nicolas Vasilache
Date: 2023-11-01T09:33:38Z
New Revision: 18669b1282d4eb20ab46a0fdc7da1993c5434049

URL: https://github.com/llvm/llvm-project/commit/18669b1282d4eb20ab46a0fdc7da1993c5434049
DIFF: https://github.com/llvm/llvm-project/commit/18669b1282d4eb20ab46a0fdc7da1993c5434049.diff

LOG: [NFC][Transform] Cleanup magic constant usage

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Transform/Transforms/Passes.h
    mlir/include/mlir/Dialect/Transform/Transforms/Passes.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h
index 7a7dfe4709b2297..74e37d58074ce61 100644
--- a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h
@@ -9,8 +9,8 @@
 #ifndef MLIR_DIALECT_TRANSFORM_TRANSFORMS_PASSES_H
 #define MLIR_DIALECT_TRANSFORM_TRANSFORMS_PASSES_H
 
+#include "mlir/Dialect/Transform/IR/TransformDialect.h"
 #include "mlir/Pass/Pass.h"
-#include <memory>
 
 namespace mlir {
 class Pass;

diff  --git a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td
index 94965a67c0c1233..c3436fd68242704 100644
--- a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td
@@ -66,7 +66,7 @@ def InterpreterPass : Pass<"transform-interpreter"> {
   let description = [{
     This pass runs the transform dialect interpreter and applies the named
     sequence transformation specified by the provided name (defaults to
-    `__transform_main`).
+    `TransformDialect::kTransformEntryPointSymbolName` (i.e. `__transform_main`)).
   }];
   let dependentDialects = ["::mlir::transform::TransformDialect"];
   let options = [
@@ -79,7 +79,7 @@ def InterpreterPass : Pass<"transform-interpreter"> {
            "false",
            "Disable expensive checks in the interpreter for a faster run.">,
     Option<"entryPoint", "entry-point", "std::string",
-           /*default=*/[{"__transform_main"}],
+           /*default=*/[{TransformDialect::kTransformEntryPointSymbolName.str()}],
            "Entry point of the pass pipeline.">,
   ];
 }


        


More information about the Mlir-commits mailing list