[PATCH] D158462: [OMPIRBuilder] Fix shared clause for task construct
Prabhdeep Soni via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 23 08:22:01 PDT 2023
psoni2628 added a comment.
In D158462#4610054 <https://reviews.llvm.org/D158462#4610054>, @psoni2628 wrote:
> In D158462#4609718 <https://reviews.llvm.org/D158462#4609718>, @kiranchandramohan wrote:
>
>> Thanks @psoni2628 for the patch. This is great.
>> Could you upload the patch with full context for ease of review?
>> Are the Clang OpenMP test failures related?
>
> Yes. So for context, the following Fortran test case was failing previously, but now it runs.
>
> subroutine foo()
> implicit none
> integer::x,y
> x=0
> !$omp task shared(x,y)
> x=2
> y=3
>
> !$omp end task
> !$omp taskwait
> print *, x, y
> end subroutine foo
>
> program p
> implicit none
>
> !$omp parallel
> !$omp single
> call foo()
> !$omp end single
> !$omp end parallel
> end program p
>
> As for the clang failures, it looks like they are related. I think I just need to update the CHECK lines, but I'm still figuring that out.
The clang test failures are being caused by my addition of `kmp_task_t` to `OMPKinds.def`. It is conflicting with Clang's definition of `kmp_task_t` in `clang/lib/CodeGen/CGOpenMPRuntime.cpp`, so the struct gets renamed to `kmp_task_t.0` and `kmp_task_t.1`. I don't think it is that simple to update the usage of `kmp_task_t` in `clang/lib/CodeGen/CGOpenMPRuntime.cpp`. Should I rename my addition of `kmp_task_t` in `OMPKinds.def` to `kmp_task`, or should I just fix the tests to allow `kmp_task_t.0` and `kmp_task_t.1`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158462/new/
https://reviews.llvm.org/D158462
More information about the llvm-commits
mailing list