[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Chi Chun Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8ab62da18d47: [Clang][OpenMP] Support for Code Generation of loop bind clause (authored by cchen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D144634#4573483 , @koops wrote: > Can someone please check for MacOS? Yesterday when this support was > committed, the CHECK statements in tests loop_bind_codegen.cpp and > loop_bind_enclosed.cpp had failed on Mac I patched

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. Can someone please check for MacOS? Yesterday when this support was committed, the CHECK statements in tests loop_bind_codegen.cpp and loop_bind_enclosed.cpp had failed on Mac and I received a comment as follows: When relanding, please remember to put a link to the rev

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-09 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 548499. koops added a reviewer: thakis. koops added a comment. Making the CHECK pattern generic to match platforms tested after committing changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 Files: c

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-07 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 547905. koops added a comment. In clang/test/OpenMP/loop_bind_enclosed.cpp Generalizing the CHECK pattern for aarch64-linux, s390x-linux and ppc64le-linux. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 F

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-04 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 547304. koops added a comment. 1. Support for PCH Serilization/deserilization for the PrevMapLoopConstruct variable in OMPExecutableDirective. 2. Modification of clang/test/PCH/pragma-loop.cpp to include "#pragma omp loop bind" with different parameters for bi

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; + koops wrote: > ABataev wrote: > > I don't see where this field is stored/loaded for PC

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-01 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; + ABataev wrote: > I don't see where this field is stored/loaded for PCH support. You need

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-08-01 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 546159. koops added a comment. 1. clang/test/OpenMP/loop_bind_enclosed.cpp : Converting main and function names within it to use regular expressions to accomodate windows platform. 2. i) Instead of calling setMappedDirective() after the the creation of the Di

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; + I don't see where this field is stored/loaded for PCH support. You need add a support

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-31 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 545728. koops added a comment. 1. clang-format error in clang/include/clang/AST/StmtOpenMP.h corrected. 2. Correcting clang/test/OpenMP/loop_bind_enclosed.cpp to use regular expressions for names of functions to take care of windows platform. CHANGES SINCE LA

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-27 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544892. koops added a comment. 1. Converting prevMapped to PrevMappedDirective 2. Reducing the CHECK patterns in loop_bind_enclosed.cpp to the most essential ones to succeed matching for the IR generation on windows. CHANGES SINCE LAST ACTION https://review

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:1652 + Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, + OpenMPDirectiveKind prevMappedDirective = OMPD_unknown) { + PrevMappedDirective CHANGES SINCE LAST ACTION

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-27 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544688. koops added a comment. Correction for clang-format errors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 Files: clang/include/clang/AST/StmtOpenMP.h clang/include/clang/Basic/DiagnosticSemaKind

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-26 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544542. koops added a comment. Fixing Alexey's suggestions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 Files: clang/include/clang/AST/StmtOpenMP.h clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind prevMappedDirective; + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; Comment at: clang/include/

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-26 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544428. koops added a comment. Moving the variable MappedDirective into structure SharingMapTy. Enough comments have been put in place to explain. Modified some of the loop_bind tests to cater to windows and debian platform. CHANGES SINCE LAST ACTION https:

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:343 + /// This may also be used in a similar way for other constructs. + OpenMPDirectiveKind MappedDirective = OMPD_unknown; + ABataev wrote: > I assume it shall be a member of SharingMapT

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-17 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 541155. koops added a comment. 1. Removing the size for the template constructor, llvm::SmallVectorImpl &ClausesWithoutBind. 2. In the diagnostic message of err_omp_bind_required_on_loop, using single quotes for the name 'loop' construct. 3. Minor changes to t

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9837 +def err_omp_bind_required_on_loop : Error< + "expected 'bind' clause for loop construct without an enclosing OpenMP " + "construct">; Also, `'loop'`

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-14 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 540373. koops added a comment. Addressing Alexey's comments. The name matching in loop_bind_messages.cpp & generic_loop_codegen.cpp tests changed to take care of the failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9838 +def err_omp_loop_reduction_clause : Error< + "reduction clause not allowed with '#pragma omp loop bind(teams)'">; def warn_break_binds_to_switch : Warning< 'reduct

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-11 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 539017. koops added a comment. 1. Taking care of Alexy & David suggestions: a) Using update_cc_test_checks.py to generate CHECK statements. b) Change in error message from "handled" to "allowed". c) Adding comments for the bind clause. d) Mangled names of the

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-05 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11094 + bool checkLastPrivateForMappedDirectives(ArrayRef Clauses); + bool mapLoopConstruct(llvm::SmallVector *ClausesWithoutBind, ABataev wrote: > const member function? > Add a comment

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-05 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/test/OpenMP/generic_loop_ast_print.cpp:26 //PRINT: T j, z; -//PRINT: #pragma omp loop collapse(C) reduction(+: z) lastprivate(j) bind(thread) +//PRINT: #pragma omp simd collapse(C) reduction(+: z) lastprivate(j) //PRINT: f

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11094 + bool checkLastPrivateForMappedDirectives(ArrayRef Clauses); + bool mapLoopConstruct(llvm::SmallVector *ClausesWithoutBind, const member function? Add a comment ==

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-22 Thread David Pagan via Phabricator via cfe-commits
ddpagan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9823 +def err_omp_loop_reduction_clause : Error< + "reduction clause not handled with '#pragma omp loop bind(teams)'">; def warn_break_binds_to_switch : Warning< Should

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-20 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. @ABataev wdyt? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-08 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 529532. koops added a comment. 1. Taken care of Alexy's comments. 2. Reverting back changes to StmtPrinter.cpp because state of AST needs to be shown as is to the developer of clang when -ast-print/-ast-dump is used. This also meant some changes to the test ca

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11083 + bool CheckLastPrivateForMappedDirectives(ArrayRef Clauses); + `checkLastPrivateForMappedDirectives` Comment at: clang/lib/AST/StmtPrinter.cpp:745-746 + OpenM

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-05-31 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. Can someone please let me know the following changes that I did in my latest patch? 1. clang/test/OpenMP/generic_loop_ast_print.cpp is failing because of the mapped directives. It is because of –ast-print & -ast-dump. This is because when the Sema comes across "omp loop

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-05-31 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 527127. koops added a comment. 1. Addition of extra test case loop_bind_enclosed.cpp. 2. Changing of name from Map1D to MappedDirective 3. Printing "omp loop bind" instead of the mapped Directives (e.g. "omp simd") when -ast-print option is used. CHANGES SINC

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-05-16 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. >> However, generic_loop_messages.cpp & generic_loop_ast_print.cpp are present >> and provide a good coverage. > > I rather doubt that these tests provide good coverage, since you're changing > the directive kind here on the fly. This is a very new functionality, which >

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D144634#4308872 , @koops wrote: > 1. Taken care of some of the comments by Alexey. > 2. Added extra tests of loop_bind_messages.cpp > > However, generic_loop_messages.cpp & generic_loop_ast_print.cpp are present > and provide

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-30 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 518341. koops added a comment. 1. Taken care of some of the comments by Alexey. 2. Added extra tests of loop_bind_messages.cpp However, generic_loop_messages.cpp & generic_loop_ast_print.cpp are present and provide a good coverage. CHANGES SINCE LAST ACTION

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Also, add AST printing tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D144634#4272857 , @koops wrote: > 1. Adding semantic test clang/test/OpenMP/loop_bind_messages.cpp. > 2. Changes suggested by Alexey. > 3. >Why need to drop bind clause here? The new Directives to which loop > directive is bei

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-16 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 514096. koops added a comment. 1. Adding semantic test clang/test/OpenMP/loop_bind_messages.cpp. 2. Changes suggested by Alexey. 3. >Why need to drop bind clause here? The new Directives to which loop directive is being mapped to, do not contain the bind clause

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9792 + "construct">; +def error_loop_reduction_clause : Error< + "reduction clause not handled with '#pragma omp loop bind(teams)'">; err_omp_... Comm

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-12 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/test/OpenMP/loop_bind_codegen.cpp:51-56 +void thread_loop2() { + #pragma omp loop bind(thread) + for (int j = 0 ; j < NNN ; j++) { +aaa[j] = j*NNN; + } +} ABataev wrote: > I think it should trigger the assert

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6124 BindKind = BC->getBindKind(); + // First check CancelRegion which is then used in checkNestingOfRegions. Remove this new line Comment at: clang/lib/Sema/SemaO

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-11 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 512448. koops added a comment. Removing changes from : 1. clang/include/clang/AST/StmtOpenMP.h 2. clang/lib/AST/StmtOpenMP.cpp 3. clang/include/clang/Parse/Parser.h These were useful when the code was in CodeGen to handle the bind clause. CHANGES SINCE LAST

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-11 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 512381. koops added a comment. Moving the code to SemaOpenMP.cpp from CodeGen. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 Files: clang/include/clang/AST/StmtOpenMP.h clang/include/clang/Basic/Diagno

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/AST/StmtOpenMP.cpp:2362 +const HelperExprs &Exprs) { + this->LoopDirCrParmV = new LoopDirCrParam(C, StartLoc, EndLoc, CollapsedNum, +Clauses, AssociatedStmt, Exprs);

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-16 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 505869. koops added a comment. Herald added subscribers: jplehr, sunshaoce. 1. formatting 2. Adding lit test 3. Removing bind clause from the set of clauses passed during bind(parallel) to the OMPForDirective and bind(teams) to the OMPDistributeDirective. CHA

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-06 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7791 +OpenMPBindClauseKind bindParam = C->getBindKind(); +switch (bindParam) { +case OMPC_BIND_parallel: { carlo.bertolli wrote: > koops wrote: > > carlo.bertolli wro

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-06 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7791 +OpenMPBindClauseKind bindParam = C->getBindKind(); +switch (bindParam) { +case OMPC_BIND_parallel: { koops wrote: > carlo.bertolli wrote: > > What if you have s

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-06 Thread Sunil K via Phabricator via cfe-commits
koops added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7791 +OpenMPBindClauseKind bindParam = C->getBindKind(); +switch (bindParam) { +case OMPC_BIND_parallel: { carlo.bertolli wrote: > What if you have something like this: > > v

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-01 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7791 +OpenMPBindClauseKind bindParam = C->getBindKind(); +switch (bindParam) { +case OMPC_BIND_parallel: { What if you have something like this: void foo(..) { #pr

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-01 Thread David Pagan via Phabricator via cfe-commits
ddpagan added a comment. How is bind(thread) not working? Runtime issue? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commit

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-01 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. LIT Test ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-02-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. We need tests. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7790 + for (const auto *C : S.getClausesOfKind()) { +OpenMPBindClauseKind bindParam = C->getBindKind(); +switch (bindParam) { style, also below. Repository: rG

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-02-23 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. bind(thread) is not working at present. I have uploaded this patch to obtain feedback mainly on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 __

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-02-23 Thread Sunil K via Phabricator via cfe-commits
koops created this revision. koops added reviewers: soumitra, RitanyaB, dreachem, ABataev, jdoerfert, sandoval, tianshilei1992. Herald added subscribers: guansong, yaxunl. Herald added a project: All. koops requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald