xref: /llvm-project/mlir/include/mlir/Rewrite/PassUtil.td (revision 6edef1356921d9cad1a8cd6169207450741536a6)
1//===-- PassUtil.td - Utilities for rewrite passes ---------*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains several utilities for passes that utilize rewrite
10// patterns.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_REWRITE_PASSUTIL_TD_
15#define MLIR_REWRITE_PASSUTIL_TD_
16
17include "mlir/Pass/PassBase.td"
18
19def RewritePassUtils {
20  // A set of options commonly options used for pattern rewrites.
21  list<Option> options = [
22    // These two options provide filtering for which patterns are applied. These
23    // should be passed directly to the FrozenRewritePatternSet when it is
24    // created.
25    ListOption<"disabledPatterns", "disable-patterns", "std::string",
26               "Labels of patterns that should be filtered out during"
27               " application">,
28    ListOption<"enabledPatterns", "enable-patterns", "std::string",
29               "Labels of patterns that should be used during"
30               " application, all other patterns are filtered out">,
31  ];
32}
33
34#endif // MLIR_REWRITE_PASSUTIL_TD_
35