[flang-commits] [flang] [Flang][OpenMP] Support unstructured code in target data (PR #71051)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Thu Nov 2 06:33:53 PDT 2023


================
@@ -2213,6 +2212,27 @@ static void createBodyOfTargetDataOp(
     }
     argIndex++;
   }
+
+  // Insert dummy instruction to remember the insertion position. The
+  // marker will be deleted since there are not uses.
+  // In the HLFIR flow there are hlfir.declares inserted above while
+  // setting block arguments.
+  mlir::Value undefMarker = firOpBuilder.create<fir::UndefOp>(
+      dataOp.getOperation()->getLoc(), firOpBuilder.getIndexType());
+
+  // Create blocks for unstructured regions. This has to be done since
+  // the original block allocation are created with the function as
----------------
kiranchandramohan wrote:

I reworded it to the following.
```
   // Create blocks for unstructured regions. This has to be done since
   // blocks are initially allocated with the function as the parent region.
```

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


More information about the flang-commits mailing list