[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Joseph Huber via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1d699bf2664d: [OpenMP] Always apply target declarations to canonical definitions (authored by jhuber6). Changed prior to commit: https://reviews.l

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 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 with a nit Comment at: clang/lib/Sema/SemaOpenMP.cpp:22991 ML->DeclarationMarkedOpenMPDeclareTarget(ND, A); + checkDeclIsAllowedInOpenMPTarget(nullptr, ND, Loc);

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 534950. jhuber6 added a comment. Updating to use `VD->redecls()`. Thanks for pointing that out, couldn't find it when I looked initially. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153369/new/ https://revie

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D153369#4452008 , @jhuber6 wrote: > In D153369#4451993 , @ABataev wrote: > >> Did you try instead fix the OMPDeclareTargetDeclAttr::getActiveAttr() >> function to make it look through

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D153369#4451993 , @ABataev wrote: > Did you try instead fix the OMPDeclareTargetDeclAttr::getActiveAttr() > function to make it look through all the declarations and return the > attribute from the first found instead of addi

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Did you try instead fix the OMPDeclareTargetDeclAttr::getActiveAttr() function to make it look through all the declarations and return the attribute from the first found instead of adding a new attribute? Comment at: clang/lib/Sema/SemaOpenMP.cpp:2299

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-26 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153369/new/ https://reviews.llvm.org/D153369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 533002. jhuber6 added a comment. Fix logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153369/new/ https://reviews.llvm.org/D153369 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/AST/dump.cpp Index: c

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 533000. jhuber6 added a comment. Adding AST mutation listener to the other modified declaration to signal that it was changed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153369/new/ https://reviews.llvm.org

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23099 +CD->addAttr(A); if (ASTMutationListener *ML = Context.getASTMutationListener()) ML->DeclarationMarkedOpenMPDeclareTarget(D, A); Need to use M

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, tra, ABataev, carlo.bertolli. Herald added subscribers: sunshaoce, guansong. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, ss