[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb5a16efbf59: [OpenMP] Specialize OpenMP calls after template instantiation (authored by jdoerfert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice accepted this revision. mikerice added a comment. This looks like the right change to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/ https://reviews.llvm.org/D77290 ___

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. From the CFE perspective, all this looks OK to me. But please give @mikerice a couple hours before committing to do a final set of comments to make sure the OMP examples are

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:2414 Expr *ExecConfig = nullptr) { -return getSema().BuildCallExpr(/*Scope=*/nullptr, Callee, LParenLoc, Args, -

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255729. jdoerfert added a comment. Reuse ActOnCallExpr, which contains the necessary logic (and a warning which we tried to avoid before). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:2414 Expr *ExecConfig = nullptr) { -return getSema().BuildCallExpr(/*Scope=*/nullptr, Callee, LParenLoc, Args, - RParenLoc,

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255709. jdoerfert added a comment. Move specializtion to the TreeTransformer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/ https://reviews.llvm.org/D77290 Files: clang/lib/Sema/TreeTransform.h

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. My reasoning is that the generic TreeTransform does semantic analysis on CallExpr and this seems to be related semantic analysis that would need to be redone when the call changed as well. Say someone codes up a new subclass of TreeTransform that maybe changes one of

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255560. jdoerfert added a comment. Override `RebuildCallExpr` in the template instantiation and specialize calls only there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8260 } -return Result; + +if (!SemaRef.getLangOpts().OpenMP || !Result.isUsable() || mikerice wrote: > I was expecting the code

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I figured in TreeTransform everyone would get this behavior but actually only template instantiation wants it so I put it there instead. Do you think it is better placed in the generic TreeTransform code after all? At least this time I verified the test passes. Sorry

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-06 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8260 } -return Result; + +if (!SemaRef.getLangOpts().OpenMP || !Result.isUsable() || I was expecting the code would be added to RebuildCallExpr in TreeTransform.h. This

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255524. jdoerfert added a comment. Move code as suggested Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/ https://reviews.llvm.org/D77290 Files: clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1693 +ExprResult TemplateInstantiator::TransformCallExpr(CallExpr *E) { + ExprResult R = TreeTransform::TransformCallExpr(E); + if

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-05 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255210. jdoerfert added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/ https://reviews.llvm.org/D77290 Files: clang/lib/Sema/SemaTemplateInstantiate.cpp

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1693 +ExprResult TemplateInstantiator::TransformCallExpr(CallExpr *E) { + ExprResult R = TreeTransform::TransformCallExpr(E); + if (!SemaRef.getLangOpts().OpenMP || !R.isUsable() ||

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 255043. jdoerfert edited the summary of this revision. jdoerfert added a comment. Rebase on D77252 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77290/new/

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1698 + auto *CE = cast(R.get()); + return SemaRef.ActOnOpenMPCall(R, nullptr, CE->getRParenLoc(), +

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-03 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1698 + auto *CE = cast(R.get()); + return SemaRef.ActOnOpenMPCall(R, nullptr, CE->getRParenLoc(), + MultiExprArg(CE->getArgs(), CE->getNumArgs()),

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim, aaron.ballman. Herald added subscribers: guansong, bollu, yaxunl. Herald added a project: clang. jdoerfert removed a parent