[flang-commits] [flang] [flang][OpenMP] Add alias analysis for omp private (PR #113566)

Dominik Adamski via flang-commits flang-commits at lists.llvm.org
Tue Nov 5 04:54:37 PST 2024


================
@@ -0,0 +1,121 @@
+// Use --mlir-disable-threading so that the AA queries are serialized
+// as well as its diagnostic output.
+// RUN: fir-opt %s -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' -split-input-file --mlir-disable-threading 2>&1 | FileCheck %s
+
+// Fortran code:
+//
+// program main
+// integer :: arrayA(10,10)
+// integer :: tmp(2)
+// integer :: i,j
+// !$omp teams distribute parallel do private(tmp)
+// do j = 1, 10
+//   do i = 1,10
+//     tmp = [i,j]
+//     arrayA = tmp(1)
+//   end do
+// end do
+// end program main
+
+// CHECK-LABEL: Testing : "_QQmain"
+// CHECK-DAG: tmp_private_array#0 <-> unnamed_array#0: NoAlias
+// CHECK-DAG: tmp_private_array#1 <-> unnamed_array#0: NoAlias
----------------
DominikAdamski wrote:

Done

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


More information about the flang-commits mailing list