diff --git a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h --- a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h +++ b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.h @@ -16,11 +16,9 @@ class Pass; namespace transform { -#define GEN_PASS_DECL_CHECKUSES +#define GEN_PASS_DECL_CHECKUSESPASS #include "mlir/Dialect/Transform/Transforms/Passes.h.inc" -std::unique_ptr createCheckUsesPass(); - #define GEN_PASS_REGISTRATION #include "mlir/Dialect/Transform/Transforms/Passes.h.inc" } // namespace transform diff --git a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td --- a/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/Transform/Transforms/Passes.td @@ -11,7 +11,7 @@ include "mlir/Pass/PassBase.td" -def CheckUses : Pass<"transform-dialect-check-uses"> { +def CheckUsesPass : Pass<"transform-dialect-check-uses"> { let summary = "warn about potential use-after-free in the transform dialect"; let description = [{ This pass analyzes operations from the transform dialect and its extensions @@ -30,7 +30,6 @@ prior to this pass provided that transform ops implement the relevant control flow interfaces. }]; - let constructor = "::mlir::transform::createCheckUsesPass()"; } #endif // MLIR_DIALECT_TRANSFORM_TRANSFORMS_PASSES diff --git a/mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp b/mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp --- a/mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp +++ b/mlir/lib/Dialect/Transform/Transforms/CheckUses.cpp @@ -20,7 +20,7 @@ namespace mlir { namespace transform { -#define GEN_PASS_DEF_CHECKUSES +#define GEN_PASS_DEF_CHECKUSESPASS #include "mlir/Dialect/Transform/Transforms/Passes.h.inc" } // namespace transform } // namespace mlir @@ -371,7 +371,7 @@ //// A simple pass that warns about any use of a value by a transform operation // that may be using the value after it has been freed. -class CheckUsesPass : public transform::impl::CheckUsesBase { +class CheckUsesPass : public transform::impl::CheckUsesPassBase { public: void runOnOperation() override { auto &analysis = getAnalysis(); @@ -397,10 +397,3 @@ } // namespace -namespace mlir { -namespace transform { -std::unique_ptr createCheckUsesPass() { - return std::make_unique(); -} -} // namespace transform -} // namespace mlir