diff --git a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h --- a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h +++ b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h @@ -63,7 +63,7 @@ /// single block. This constraint makes it easy to determine the result. /// This method also clones the `arith::ConstantIndexOp` at the start of /// `outlinedFuncBody` to alloc simple canonicalizations. -/// Creates a new FuncOp and thus cannot be used in a FunctionPass. +/// Creates a new FuncOp and thus cannot be used in a FuncOp pass. /// The client is responsible for providing a unique `funcName` that will not /// collide with another FuncOp name. // TODO: support more than single-block regions. @@ -76,7 +76,7 @@ /// region is inlined into a new FuncOp that is captured by the pointer. /// - if `elseFn` is not null, `elseFnName` must be specified and the `else` /// region is inlined into a new FuncOp that is captured by the pointer. -/// Creates new FuncOps and thus cannot be used in a FunctionPass. +/// Creates new FuncOps and thus cannot be used in a FuncOp pass. /// The client is responsible for providing a unique `thenFnName`/`elseFnName` /// that will not collide with another FuncOp name. LogicalResult outlineIfOp(RewriterBase &b, scf::IfOp ifOp, FuncOp *thenFn, diff --git a/mlir/include/mlir/Pass/Pass.h b/mlir/include/mlir/Pass/Pass.h --- a/mlir/include/mlir/Pass/Pass.h +++ b/mlir/include/mlir/Pass/Pass.h @@ -375,35 +375,6 @@ OperationPass(const OperationPass &) = default; }; -/// NOTICE: This class is deprecated in favor of `OperationPass` -/// and will be removed soon. -/// A model for providing function pass specific utilities. -/// -/// Derived function passes are expected to provide the following: -/// - A 'void runOnFunction()' method. -/// - A 'StringRef getName() const' method. -/// - A 'std::unique_ptr clonePass() const' method. -class [[deprecated( - "Use OperationPass instead: See " - "https://llvm.discourse.group/t/" - "functionpass-deprecated-in-favor-of-operationpass-funcop")]] FunctionPass - : public OperationPass { -public: - using OperationPass::OperationPass; - - /// The polymorphic API that runs the pass over the currently held function. - virtual void runOnFunction() = 0; - - /// The polymorphic API that runs the pass over the currently held operation. - void runOnOperation() final { - if (!getFunction().isExternal()) - runOnFunction(); - } - - /// Return the current function being transformed. - FuncOp getFunction() { return this->getOperation(); } -}; - /// This class provides a CRTP wrapper around a base pass class to define /// several necessary utility methods. This should only be used for passes that /// are not suitably represented using the declarative pass specification(i.e. diff --git a/mlir/include/mlir/Pass/PassBase.td b/mlir/include/mlir/Pass/PassBase.td --- a/mlir/include/mlir/Pass/PassBase.td +++ b/mlir/include/mlir/Pass/PassBase.td @@ -92,9 +92,4 @@ class Pass : PassBase">; -/// NOTICE: This class is deprecated in favor of `Pass<..., "mlir::FuncOp">` -/// and will be removed soon. -// This class represents an mlir::FunctionPass. -class FunctionPass : PassBase; - #endif // MLIR_PASS_PASSBASE