llvm/mlir/include/mlir/Rewrite/PatternApplicator.h

//===- PatternApplicator.h - PatternApplicator ------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements an applicator that applies pattern rewrites based upon a
// user defined cost model.
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_REWRITE_PATTERNAPPLICATOR_H
#define MLIR_REWRITE_PATTERNAPPLICATOR_H

#include "mlir/Rewrite/FrozenRewritePatternSet.h"

#include "mlir/IR/Action.h"

namespace mlir {
class PatternRewriter;

namespace detail {
class PDLByteCodeMutableState;
} // namespace detail

/// This is the type of Action that is dispatched when a pattern is applied.
/// It captures the pattern to apply on top of the usual context.
class ApplyPatternAction : public tracing::ActionImpl<ApplyPatternAction> {};

/// This class manages the application of a group of rewrite patterns, with a
/// user-provided cost model.
class PatternApplicator {};

} // namespace mlir

#endif // MLIR_REWRITE_PATTERNAPPLICATOR_H