/// 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.
/// 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,
OperationPass(const OperationPass &) = default;
};
-/// NOTICE: This class is deprecated in favor of `OperationPass<FuncOp>`
-/// 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<Pass> clonePass() const' method.
-class [[deprecated(
- "Use OperationPass<FuncOp> instead: See "
- "https://llvm.discourse.group/t/"
- "functionpass-deprecated-in-favor-of-operationpass-funcop")]] FunctionPass
- : public OperationPass<FuncOp> {
-public:
- using OperationPass<FuncOp>::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.
class Pass<string passArg, string operation = "">
: PassBase<passArg, "::mlir::OperationPass<" # operation # ">">;
-/// NOTICE: This class is deprecated in favor of `Pass<..., "mlir::FuncOp">`
-/// and will be removed soon.
-// This class represents an mlir::FunctionPass.
-class FunctionPass<string passArg> : PassBase<passArg, "::mlir::FunctionPass">;
-
#endif // MLIR_PASS_PASSBASE