[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-27 Thread Shraiysh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9fb52cb3f123: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write (authored by shraiysh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ ht

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-27 Thread Shraiysh via Phabricator via cfe-commits
shraiysh updated this revision to Diff 382537. shraiysh added a comment. Rebase with main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ https://reviews.llvm.org/D111992 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp flang/lib/Semantics/

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added inline comments. Comment at: mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:1246 +StringRef memOrder = op.memory_order().getValue(); +if (memOrder.equals("acq_rel") || memOrder.equals("release")) + return op.emitError( shraiysh wrote: >

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added a comment. Thanks for the review @peixin. Comment at: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td:513 + +def AtomicReadOp : OpenMP_Op<"atomic.read"> { + let arguments = (ins OpenMP_PointerLikeType:$address, peixin wrote: > How do you plan to h

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5993 case OMPC_adjust_args: + case OMPC_memory_order: llvm_unreachable("Clause is not allowed in 'omp atomic'."); peixin wrote: > The memory_order clause in clang side is not ha

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5993 case OMPC_adjust_args: + case OMPC_memory_order: llvm_unreachable("Clause is not allowed in 'omp atomic'."); The memory_order clause in clang side is not handled in this pa

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh updated this revision to Diff 381772. shraiysh added a comment. Rebase with main, updated syntax. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ https://reviews.llvm.org/D111992 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp fla

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-23 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added a comment. In D111992#3080308 , @kiranchandramohan wrote: > LGTM. > > My preference is the following one. If you agree then please make the change, > otherwise, you can keep it as is. Also, wait a couple of days to see whether > others h

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-22 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan accepted this revision. kiranchandramohan added a comment. This revision is now accepted and ready to land. LGTM. My preference is the following one. If you agree then please make the change, otherwise, you can keep it as is. Also, wait a couple of days to see whether others h

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-20 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added a comment. Hi @kiranchandramohan. Thanks for the review. > %8 = omp.atomic.read %addr : memref -> i32 hint(speculative, > contended) memory_order(seq_cst) This cannot be done because the statement ends at optional clauses. This is dangerous in the following situation where par

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-20 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. The patch looks OK. I just wanted to discuss the syntax also. Would any of the following be better? %8 = omp.atomic.read %addr : memref -> i32 hint(speculative, contended) memory_order(seq_cst) %8 = omp.atomic.read %addr hint(speculative, contended) memo

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-19 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added a comment. Hi all, the NFC has been merged, and the build is passing. This is ready for review now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ https://reviews.llvm.org/D111992

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-19 Thread Shraiysh via Phabricator via cfe-commits
shraiysh updated this revision to Diff 380718. shraiysh added a comment. Herald added projects: clang, Flang. Herald added a subscriber: cfe-commits. Rebase with main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ https://reviews.llvm.or