[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-03-01 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Herald added a project: All. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1505 + /// valid in the condition block (i.e., defined in the preheader) and is + /// interpreted as an unsigned integer. + void setTripCount(Value

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-03-01 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1505 + /// valid in the condition block (i.e., defined in the preheader) and is + /// interpreted as an unsigned integer. + void setTripCount(Value *TripCount);

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-02-14 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. Except for three nits. LGTM. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:1505 + /// valid in the condition block (i.e., defined in the preheader) and is + /// interpreted as an unsigned integer. + void setTripCount(Value *TripCount);

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-30 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. Thanks for the fix. The fix of off-by-one issue looks ok to me. Will continue reviewing other parts in one week due to the Spring Festival in China. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114413/new/

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-29 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. @peixin Thanks for testing edge cases. You hit multiple issues: 1. Chunksize was i32, combining it with a i64 induction variable caused an error. Fixed the latest update of this patch. 2. OpenMPIRBuilder currently doesn't work really with exceptions. See D115216

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-28 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. When I investigated the edge cases you mentioned in D116292 . Found one unsupported case as follows #include #include using namespace std; void func(unsigned long long lb, unsigned long long ub, unsigned long long step) {

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-26 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. Can you rebase this? I cannot apply this patch on current main branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114413/new/ https://reviews.llvm.org/D114413 ___ cfe-commits

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-13 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. BTW, please rebase on main. There is one conflict about function `getOrCreateSrcLocStr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114413/new/ https://reviews.llvm.org/D114413

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2022-01-13 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. Herald added a subscriber: awarzynski. @Meinersbur Here is the c++ code test. Without the chunk size specified, the running result using OMPIRBuilder is correct. #include int main() { int i, N = 10; float x = 0.0; #pragma omp for schedule(static, 2)

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-12-09 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. Can you check the following example by applying this patch on fir-dev? program main integer :: i, N = 10 real :: x = 0 !$omp do schedule(static, 2) do i = 3, N x = x + i end do !$omp end do print *, x end Test running result:

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-12-06 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. In D114413#3166979 , @Meinersbur wrote: > In D114413#3160044 , @peixin wrote: > >> In D114413#3159095 , @Meinersbur >> wrote: >> >>> In

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-12-02 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D114413#3160044 , @peixin wrote: > In D114413#3159095 , @Meinersbur > wrote: > >> In D114413#3154936 , @peixin wrote: >> >>> > >

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-11-30 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. In D114413#3159095 , @Meinersbur wrote: > In D114413#3154936 , @peixin wrote: > >> @Meinersbur Please rebase on main. The function "getPreheader()" was moved >> into OMPIRBuilder.h. > >

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-11-29 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D114413#3154936 , @peixin wrote: > @Meinersbur Please rebase on main. The function "getPreheader()" was moved > into OMPIRBuilder.h. I rebased, but I am not sure what you are referring to. `getPreheader()` always was in

[PATCH] D114413: [OpenMPIRBuilder] Implement static-chunked workshare-loop schedules.

2021-11-29 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added a comment. @Meinersbur Please rebase on main. The function "getPreheader()" was moved into OMPIRBuilder.h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114413/new/ https://reviews.llvm.org/D114413