1//===-- Passes.td - OpenACC 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_OPENACC_TRANSFORMS_PASSES 10#define MLIR_DIALECT_OPENACC_TRANSFORMS_PASSES 11 12include "mlir/Pass/PassBase.td" 13 14def LegalizeDataValuesInRegion : Pass<"openacc-legalize-data-values", "mlir::func::FuncOp"> { 15 let summary = "Legalizes SSA values in compute regions with results from data clause operations"; 16 let description = [{ 17 This pass replace uses of the `varPtr` in compute regions (kernels, 18 parallel, serial) with the result of data clause operations (`accPtr`). 19 }]; 20 let options = [ 21 Option<"hostToDevice", "host-to-device", "bool", "true", 22 "Replace varPtr uses with accPtr if true. Replace accPtr uses with " 23 "varPtr if false">, 24 Option<"applyToAccDataConstruct", "apply-to-acc-data-construct", "bool", "true", 25 "Replaces varPtr uses with accPtr for acc compute regions contained " 26 "within acc.data or acc.declare region."> 27 ]; 28} 29 30#endif // MLIR_DIALECT_OPENACC_TRANSFORMS_PASSES 31