[PATCH] D28781: [OpenMP] Support for the if-clause on the combined directive 'target parallel'.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 17 05:46:51 PST 2017


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:84-115
+/// Lexical scope for OpenMP parallel construct, that handles correct codegen
+/// for captured expressions.
+class OMPParallelScope final : public CodeGenFunction::LexicalScope {
+  void emitPreInitStmt(CodeGenFunction &CGF, const OMPExecutableDirective &S) {
+    OpenMPDirectiveKind Kind = S.getDirectiveKind();
+    if (!isOpenMPTargetExecutionDirective(Kind) &&
+        isOpenMPParallelDirective(Kind)) {
----------------
Could you join it with `OMPLexicalScope` somehow? I don't like the idea of adding a different kind of scope for parallel and other directives.
Or follow the solution for `OMPLoopScope`, rather than for `OMPLexicalScope`.


https://reviews.llvm.org/D28781





More information about the cfe-commits mailing list