[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9670 Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; mikerice wrote: > It seems this change is no longer in the compiler, as it was reverted by the > next commit to this file. Was that intentional? See: > https://reviews.llvm.org/D90101. Yeah, it is not needed anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
mikerice added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9670 Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; It seems this change is no longer in the compiler, as it was reverted by the next commit to this file. Was that intentional? See: https://reviews.llvm.org/D90101. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe20d64c3d9d8: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp openmp/libomptarget/test/offloading/bug47654.cpp Index: openmp/libomptarget/test/offloading/bug47654.cpp === --- /dev/null +++ openmp/libomptarget/test/offloading/bug47654.cpp @@ -0,0 +1,29 @@ +// RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda + +#include +#include + +int main(int argc, char *argv[]) { + int i = 0, j = 0; + +#pragma omp target map(tofrom : i, j) nowait + { +i = 1; +j = 2; + } + +#pragma omp taskwait + + assert(i == 1); + assert(j == 2); + + std::cout << "PASS\n"; + + return 0; +} + +// CHECK: PASS Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); Index: openmp/libomptarget/test/offloading/bug47654.cpp === --- /dev/null +++ openmp/libomptarget/test/offloading/bug47654.cpp @@ -0,0 +1,29 @@ +// RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda + +#include +#include + +int main(int argc, char *argv[]) { + int i = 0, j = 0; + +#pragma omp target map(tofrom : i, j) nowait + { +i = 1; +j = 2; + } + +#pragma omp taskwait + + assert(i == 1); + assert(j == 2); + + std::cout << "PASS\n"; + + return 0; +} + +// CHECK: PASS Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
tianshilei1992 updated this revision to Diff 300754. tianshilei1992 added a comment. Herald added a project: OpenMP. Herald added a subscriber: openmp-commits. Added a test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp openmp/libomptarget/test/offloading/bug47654.cpp Index: openmp/libomptarget/test/offloading/bug47654.cpp === --- /dev/null +++ openmp/libomptarget/test/offloading/bug47654.cpp @@ -0,0 +1,29 @@ +// RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda + +#include +#include + +int main(int argc, char *argv[]) { + int i = 0, j = 0; + +#pragma omp target map(tofrom : i, j) nowait + { +i = 1; +j = 2; + } + +#pragma omp taskwait + + assert(i == 1); + assert(j == 2); + + std::cout << "PASS\n"; + + return 0; +} + +// CHECK: PASS Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); Index: openmp/libomptarget/test/offloading/bug47654.cpp === --- /dev/null +++ openmp/libomptarget/test/offloading/bug47654.cpp @@ -0,0 +1,29 @@ +// RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu +// RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda + +#include +#include + +int main(int argc, char *argv[]) { + int i = 0, j = 0; + +#pragma omp target map(tofrom : i, j) nowait + { +i = 1; +j = 2; + } + +#pragma omp taskwait + + assert(i == 1); + assert(j == 2); + + std::cout << "PASS\n"; + + return 0; +} + +// CHECK: PASS Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
tianshilei1992 added a comment. I don't think the failed case has anything to do with this patch. It must be a random issue in the bolt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D89844: [Clang][OpenMP] Fixed an issue of segment fault when using target nowait
tianshilei1992 updated this revision to Diff 300451. tianshilei1992 added a comment. Reverted changes for target data. It will be in another patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89844/new/ https://reviews.llvm.org/D89844 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp === --- clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -9664,11 +9664,10 @@ TargetDataInfo Info; // Fill up the arrays and create the arguments. emitOffloadingArrays(CGF, CombinedInfo, Info); -bool HasDependClauses = D.hasClausesOfKind(); emitOffloadingArraysArgument(CGF, Info.BasePointersArray, Info.PointersArray, Info.SizesArray, Info.MapTypesArray, Info.MappersArray, Info, - {/*ForEndTask=*/false, HasDependClauses}); + {/*ForEndTask=*/false, RequiresOuterTask}); InputInfo.NumberOfTargetItems = Info.NumberOfPtrs; InputInfo.BasePointersArray = Address(Info.BasePointersArray, CGM.getPointerAlign()); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits