================
@@ -128,4 +128,21 @@ def AutomapToTargetDataPass
   let dependentDialects = ["mlir::omp::OpenMPDialect"];
 }
 
+def StackToSharedPass : Pass<"omp-stack-to-shared", "mlir::func::FuncOp"> {
+  let summary = "Replaces stack allocations with shared memory.";
+  let description = [{
+    `fir.alloca` operations defining values in a target region and then used
+    inside of an `omp.parallel` region are replaced by this pass with
+    `omp.alloc_shared_mem` and `omp.free_shared_mem`. This is also done for
----------------
Meinersbur wrote:

```suggestion
    This pass replaces `fir.alloca` that are defined in target regions, but 
outside of `omp.parallel` regions, with
    `omp.alloc_shared_mem` and `omp.free_shared_mem`. This is also done for
```


https://github.com/llvm/llvm-project/pull/161863
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to