[PATCH] D120573: [OpenMP] Support runtime user conditions in metadirective
Giorgis Georgakoudis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 23 07:11:08 PDT 2022
ggeorgakoudis added inline comments.
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1793
+void CodeGenFunction::EmitOMPMetaDirective(const OMPMetaDirective &D) {
+ llvm::BasicBlock *AfterBlock =
+ createBasicBlock("omp.meta.user.condition.after");
----------------
abidmalikwaterloo wrote:
> Why are you skipping the AST building part? Any special significance of this approach?
I don't understand the question, what do you mean by that? Emit generates code to handle dynamic and static conditions based on the when clauses
================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1852
+ int BestIdx = getBestVariantMatchForContext(StaticVMIs, OMPCtx);
+
+ EmitStmt(StaticWhenClauses[BestIdx]->getDirective());
----------------
abidmalikwaterloo wrote:
> This approach is valid for static conditions. How you are going to take care of multiple dynamic/runtime conditions?
See GenerateCond that creates code for dynamic conditions. If the when clause has dynamically evaluated conditions it generates basicblocks and control logic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120573/new/
https://reviews.llvm.org/D120573
More information about the cfe-commits
mailing list