This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][OpenMP] Set AllocaIP correctly for constructs nested in task
ClosedPublic

Authored by kiranchandramohan on May 20 2023, 3:57 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
kiranchandramohan requested review of this revision.May 20 2023, 3:57 AM
This revision is now accepted and ready to land.May 21 2023, 3:51 AM

This does not appear to solve the issue in D146766. I tried the following test case below and it still segmentation faults at run time. Could you please check if the test case works for you?

subroutine foo()
  implicit none
  integer::x,y
  x=0
  y=2
   !$omp task shared(x,y)
   y=x
   !$omp end task
   !$omp taskwait
   print*,"y=",y
end subroutine foo

program p
implicit none
call foo()
end program p

This does not appear to solve the issue in D146766. I tried the following test case below and it still segmentation faults at run time. Could you please check if the test case works for you?

subroutine foo()
  implicit none
  integer::x,y
  x=0
  y=2
   !$omp task shared(x,y)
   y=x
   !$omp end task
   !$omp taskwait
   print*,"y=",y
end subroutine foo

program p
implicit none
call foo()
end program p

Yes, you are right. It does not fix the issue. I kind of forgot that the issue in D146766 is a runtime crash. Anyway this helps fix a crash during compilation for openmp constructs nested in task. So is it OK to proceed with this? I will amend the summary and remove the mention of D146766.

kiranchandramohan edited the summary of this revision. (Show Details)May 21 2023, 9:43 AM
psoni2628 accepted this revision.May 21 2023, 8:11 PM

This does not appear to solve the issue in D146766. I tried the following test case below and it still segmentation faults at run time. Could you please check if the test case works for you?

subroutine foo()
  implicit none
  integer::x,y
  x=0
  y=2
   !$omp task shared(x,y)
   y=x
   !$omp end task
   !$omp taskwait
   print*,"y=",y
end subroutine foo

program p
implicit none
call foo()
end program p

Yes, you are right. It does not fix the issue. I kind of forgot that the issue in D146766 is a runtime crash. Anyway this helps fix a crash during compilation for openmp constructs nested in task. So is it OK to proceed with this? I will amend the summary and remove the mention of D146766.

Yes, other than that, it works fine.