[PATCH] D92732: [Flang][OpenMP 4.5] Add semantic check for OpenMP Do Loop Constructs

Yashaswini Hegde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 18:55:53 PST 2021


yhegde added a comment.

In D92732#2551418 <https://reviews.llvm.org/D92732#2551418>, @kiranchandramohan wrote:

> Thanks @yhegde for the changes. I believe this threadprivate check needs some more design and work. I don' t think we can clear the threadprivate symbols in module subprograms because it will fail to catch the error in test1 below. I think the threadprivate information should be captured in a symbol so that it is available in places where the module is used like in test2.

Thank you for the review comments @kiranchandramohan . Can I split this patch one with threadprivate and cycle , dowhile etc with another patch ?

> Would it be OK to move threadprivate checks to a separate patch? So that we can merge the other checks? We can even consider moving threadprivate out of the current statement of work since supporting this feature might be more effort than estimated. cc: @richard.barton.arm
>
> test1
>
>   module md
>   integer :: i, j
>   !$omp  threadprivate(i)
>   contains
>   subroutine sb1
>   !$omp  do
>   do i = 1, 10
>     do j = 1, 10
>       print *, "Hello"
>     end do
>   end do
>   !$omp end do
>   end subroutine
>   end module
>
> test2
>
>   module md
>   integer :: i
>   !$omp  threadprivate(i)
>   end module
>   
>   program mn
>   use md 
>   !$omp  do
>   do i = 1, 10 
>     do j = 1, 10
>       print *, "Hello"
>     end do
>   end do
>   !$omp end do
>   end program




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92732/new/

https://reviews.llvm.org/D92732



More information about the llvm-commits mailing list