[flang-commits] [flang] [flang][MLIR][OpenMP] Extend delayed privatization for scalar allocatables (PR #84740)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Mon Mar 11 03:36:01 PDT 2024


ergawy wrote:

> ... And sorry for the changes you had to make due to the previous usage of both base and original base.

No problem at all. I learned quite a bit trying to figure out the solution so the time spent did not go to waste for sure.

> I was expecting the deallocation of the allocatable variable to be inside a separate region in the PrivateClause Op.
> 
> ```
> init {
> } copy {
> } dealloc {
> // insert dealloc here
> }
> ```

That should be the case indeed. I added a `TODO` in `DataSharingProcessor::insertDeallocs()` to extend `omp.private` op to add a `dealloc` region since we don't have that one (I did not anticipate the need for it since I was not familiar with how allocatables work when I started). I will create follow up PR(s) for this if you don't mind.

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


More information about the flang-commits mailing list