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