[flang] [llvm] [flang][OpenMP] Try to unify induction var privatization for OMP regions. (PR #91116)

Sergio Afonso via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 07:21:15 PDT 2024


================
@@ -289,12 +290,34 @@ void DataSharingProcessor::collectSymbolsInNestedRegions(
        eval.getNestedEvaluations()) {
     if (nestedEval.hasNestedEvaluations()) {
       if (nestedEval.isConstruct())
-        // Recursively look for OpenMP constructs within `nestedEval`'s region
         collectSymbolsInNestedRegions(nestedEval, flag, symbolsInNestedRegions);
-      else
-        converter.collectSymbolSet(nestedEval, symbolsInNestedRegions, flag,
-                                   /*collectSymbols=*/true,
-                                   /*collectHostAssociatedSymbols=*/false);
+      else {
+        bool isOrderedConstruct = [&]() {
----------------
skatrak wrote:

> I get semantic error as: `error: DEFAULT clause is not allowed on the DO directive`

I think this error happens earlier in semantics because `OMPC_Default` is not listed in the allowed clauses of `OMP_Do` in "llvm/include/llvm/Frontend/OpenMP/OMP.td". Not sure whether it should be allowed or not (making that error expected), since I'm not familiar with that part of the spec.

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


More information about the llvm-commits mailing list