[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-06-01 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-31 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-05 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6168 llvm::Value *EVal = CGF.EmitScalarExpr(E); + if (auto CI = dyn_cast(EVal)) +EVal = CGF.Builder.CreateIntCast( ABataev wrote: > 1. `auto *CI` > 2. What if this is

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6168 llvm::Value *EVal = CGF.EmitScalarExpr(E); + if (auto CI = dyn_cast(EVal)) +EVal = CGF.Builder.CreateIntCast( 1. `auto *CI` 2. What if this is not a constant, but just a

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-04 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 427182. tianshilei1992 added a comment. fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 Files: clang/include/clang/AST/StmtOpenMP.h

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); tianshilei1992 wrote: > tianshilei1992 wrote: > > ABataev wrote: > > > Why do we need to use

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-04 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); tianshilei1992 wrote: > ABataev wrote: > > Why do we need to use `IgnoreImpCasts()` here and

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-04-18 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); ABataev wrote: > Why do we need to use `IgnoreImpCasts()` here and in other places? Clang

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-04-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); Why do we need to use `IgnoreImpCasts()` here and in other places? Repository: rG LLVM Github

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-04-15 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 423198. tianshilei1992 marked an inline comment as done. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 Files:

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-04-15 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 3 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:2835-2847 bool IsXLHSInRHSPart = false; /// Used for 'atomic update' or 'atomic capture' constructs. They may /// have atomic

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-04-15 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 423132. tianshilei1992 added a comment. Herald added a project: All. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 Files:

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6216 - KindsEncountered.contains(OMPC_capture)) { -IsCompareCapture = true; Kind = OMPC_compare; tianshilei1992 wrote: > ABataev wrote: > > Can this be fixed in a

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:2917-2920 Create(const ASTContext , SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, - Expr *E, Expr *UE, Expr *D,

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:2917-2920 Create(const ASTContext , SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, - Expr *E, Expr *UE, Expr *D, Expr

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-27 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 411688. tianshilei1992 marked an inline comment as done. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/ https://reviews.llvm.org/D120290 Files:

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6067 + if (VPtr) { +VOpVal = {VPtr, VPtr->getType()->getPointerElementType(), + V->getType().isVolatileQualified(),

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-23 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 410986. tianshilei1992 marked an inline comment as done. tianshilei1992 added a comment. rebase and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120290/new/

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-23 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6067 + if (VPtr) { +VOpVal = {VPtr, VPtr->getType()->getPointerElementType(), + V->getType().isVolatileQualified(), Please avoid adding new calls to

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked 2 inline comments as done. tianshilei1992 added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:2835-2847 bool IsXLHSInRHSPart = false; /// Used for 'atomic update' or 'atomic capture' constructs. They may /// have atomic

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-22 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 marked an inline comment as done. tianshilei1992 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11556 X = ThenBO->getLHS(); - D = ThenBO->getRHS(); + D = ThenBO->getRHS()->IgnoreImpCasts(); ABataev wrote: > Need to be

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-02-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:2835-2847 bool IsXLHSInRHSPart = false; /// Used for 'atomic update' or 'atomic capture' constructs. They may /// have atomic expressions of forms /// \code /// v = x; ; /// ; v =