[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-19 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. @kaz7, it seems that the thread_limit is being set properly, but the `omp_get_thread_limit()` is giving a wrong output when you enable anything more than `-O1`. I will fix it as soon as I can. Meanwhile, if you absolutely want the test case to work right now, remo

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-09-07 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: openmp/runtime/test/target/target_thread_limit.cpp:28 +// OMP51: target: parallel +// OMP51: target: parallel +// OMP51-NOT: target: parallel mstorsjo wrote: > mstorsjo wrote: > > This test fails when running (on W

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553487. sandeepkosuri added a comment. made new LIT test cases target specific to linux Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: clang/include/c

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553405. sandeepkosuri added a comment. Made LIT test cases more robust to check lines ordering problem Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553358. sandeepkosuri added a comment. Used `CHECK-DAG` s to avoid LIT test failures on Windows system Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 553139. sandeepkosuri added a comment. Edited the LIT test cases to use more script generated check lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri marked an inline comment as done. sandeepkosuri added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPAR

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri marked an inline comment as done. sandeepkosuri added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPAR

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 552725. sandeepkosuri added a comment. Added PCH options to the RUN lines in LIT tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: clang/include/cl

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-09 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 548518. sandeepkosuri added a comment. Used the python script `update_cc_test_checks.py` to generate the checks for the newly added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-08 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 548082. sandeepkosuri added a comment. - Updated `SemaOpenMP.cpp` to support `thread_limit` clause on the newly allowed directives. - This update is to fix the newly added LIT tests' failures (which were occurring only on debug build) CHANGES SINCE

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-06 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. In D152054#4560353 , @tianshilei1992 wrote: > Is this patch to support `thread_limit` on `target` directive on the host? Yes @tianshilei1992 , It is for host only Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-04 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866 + (CGM.getLangOpts().OpenMP >= 51 && + needsTaskBasedThreadLimit(D.getDirectiveKind()) && + D.hasClausesOfKind()); ABataev wrote: > I think you don't need

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 544201. sandeepkosuri added a comment. Explicitly mentioned `-fopenmp-version=51` in LIT test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: cla

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-25 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 543889. sandeepkosuri added a comment. - Added support for `thread_limit` clause on relevant combined directives which begin with `target` as per @ABataev 's comments. - Added additional LIT test cases to check codegen of the `thread_limit` on the newl

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-30 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9818 + D.hasClausesOfKind() || + (CGM.getLangOpts().OpenMP >= 51 && D.getDirectiveKind() == OMPD_target && + D.hasClausesOfKind()); ABataev wrote: > What if D i

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-12 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 530591. sandeepkosuri added a comment. Updated `target_codegen.cpp` test case to incorporate my changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files:

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-03 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri created this revision. sandeepkosuri added reviewers: ABataev, soumitra, koops, RitanyaB, dreachem. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. sandeepkosuri requested review of this revision. Herald added a reviewer: jdoerfert. Herald added sub

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2023-02-08 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. In D127855#4048642 , @jyu2 wrote: > In D127855#3956014 , @sandeepkosuri > wrote: > >> As I do not have commit access, can someone commit this patch, now that it >> passes the pre-m

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2023-01-17 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. In D127855#4059776 , @jyu2 wrote: > Hi @sandeepkosuri, do you plan to fix this? Thanks. Jennifer Hi jyu2, sorry for a late reply, and yes I will fix it. Thanks for pointing this out. Repository: rG LLVM Github Monore

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-11-28 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added a comment. As I do not have commit access, can someone commit this patch, now that it passes the pre-merge tests ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127855/new/ https://reviews.llvm.org/D127855 ___ cfe-commits

[PATCH] D137765: [NFC] Fixing a comment and some indentations

2022-11-09 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri created this revision. sandeepkosuri added reviewers: cchen, ABataev, RitanyaB, soumitra. Herald added a project: All. sandeepkosuri requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https:

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-11-09 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10634 "OpenMP constructs may not be nested inside an atomic region">; +def err_omp_prohibited_region_order +: Error<"construct %0 not allowed in a region associated with a dir

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-10-13 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri added inline comments. Comment at: clang/include/clang/Sema/Scope.h:483-488 + /// Determine whether this scope is some OpenMP directive with + /// order clause which specifies concurrent scope. + bool isOpenMPOrderClauseScope() const{ +return getFlags() & Sco