xref: /llvm-project/mlir/include/mlir/Dialect/MLProgram/Transforms/Passes.td (revision cbd475040f8952cfc55b9e13dd5ce6c4f6434cd3)
1//===-- Passes.td - 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_MLPROGRAM_TRANSFORMS_PASSES
10#define MLIR_DIALECT_MLPROGRAM_TRANSFORMS_PASSES
11
12include "mlir/Pass/PassBase.td"
13
14def MLProgramPipelineGlobals : Pass<"mlprogram-pipeline-globals", "ModuleOp"> {
15  let summary = "Optimize `ml_program` global operations for read and store";
16  let description = [{
17    `ml_program`'s load and store operations can be optimized for
18    write-write or write-read sets of operations. This allows known
19    tensors to not be re-read when the value is already known in IR.
20
21    The pass is designed to handle both nested regions and function calls
22    safely.
23  }];
24  let constructor = "mlir::ml_program::createMLProgramPipelineGlobalsPass()";
25}
26
27#endif // MLIR_DIALECT_MLPROGRAM_TRANSFORMS_PASSES
28