xref: /llvm-project/mlir/include/mlir/Dialect/Func/Transforms/Passes.td (revision e394fecd5b351e9108d0600c872759d8dea88a42)
1//===-- Passes.td - Func pass definition file --------------*- 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#ifndef MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD
10#define MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD
11
12include "mlir/Pass/PassBase.td"
13
14def DuplicateFunctionEliminationPass : Pass<"duplicate-function-elimination",
15    "ModuleOp"> {
16  let summary = "Deduplicate functions";
17  let description = [{
18    Deduplicate functions that are equivalent in all aspects but their symbol
19    name. The pass chooses one representative per equivalence class, erases
20    the remainder, and updates function calls accordingly.
21  }];
22  let constructor = "mlir::func::createDuplicateFunctionEliminationPass()";
23}
24
25#endif // MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD
26