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

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 07:52:41 PST 2021


kiranchandramohan added a comment.

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.

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