[flang-commits] [mlir] [flang] [mlir][openacc] Add legalize data pass for compute operation (PR #80351)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Feb 2 12:11:45 PST 2024


================
@@ -0,0 +1,28 @@
+//===-- Passes.td - OpenACC pass definition file -----------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_DIALECT_OPENACC_TRANSFORMS_PASSES
+#define MLIR_DIALECT_OPENACC_TRANSFORMS_PASSES
+
+include "mlir/Pass/PassBase.td"
+
+def LegalizeDataInRegion : Pass<"openacc-legalize-data", "mlir::func::FuncOp"> {
+  let summary = "Legalize the data in the compute region";
+  let description = [{
+    This pass replace uses of varPtr in the compute region with their accPtr
----------------
vzakhari wrote:

nit
```suggestion
    This pass replaces uses of varPtr in the compute region with their accPtr
```

https://github.com/llvm/llvm-project/pull/80351


More information about the flang-commits mailing list