xref: /llvm-project/mlir/examples/standalone/include/Standalone/StandalonePasses.td (revision 5e2afe5c665ab3ea344a9c3fb34c6b9930a9094d)
1//===- StandalonePsss.td - Standalone dialect passes -------*- tablegen -*-===//
2//
3// This file is licensed 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#ifndef STANDALONE_PASS
10#define STANDALONE_PASS
11
12include "mlir/Pass/PassBase.td"
13
14def StandaloneSwitchBarFoo: Pass<"standalone-switch-bar-foo", "::mlir::ModuleOp"> {
15  let summary = "Switches the name of a FuncOp named `bar` to `foo` and folds.";
16  let description = [{
17    Switches the name of a FuncOp named `bar` to `foo` and folds.
18    ```
19    func.func @bar() {
20      return
21    }
22    // Gets transformed to:
23    func.func @foo() {
24      return
25    }
26    ```
27  }];
28}
29
30#endif // STANDALONE_PASS
31