[PATCH] D28753: [OpenMP] Codegen support for 'target parallel' on the host.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 16 00:30:00 PST 2017
ABataev added inline comments.
================
Comment at: include/clang/Sema/Sema.h:8328-8330
+ /// Return the number of captured regions created for an OpenMP directive.
+ static int getOpenMPCaptureLevels(OpenMPDirectiveKind Kind);
+
----------------
I think it would be good to have a member function that returns the captured statement for the provided OpenMP region kind, like `CapturedStmt *getCapturedStmt(OpenMPDirectiveKind Kind)`. In this case you don't need to add an additional parameter for the codegen functions
================
Comment at: lib/Sema/SemaOpenMP.cpp:1914
+};
+}
+
----------------
} // namespace
================
Comment at: lib/Sema/SemaOpenMP.cpp:2001-2003
+ while (--ThisCaptureLevel >= 0) {
+ SR = ActOnCapturedRegionEnd(SR.get());
+ }
----------------
No braces here
================
Comment at: lib/Sema/TreeTransform.h:7243-7245
+ while (--ThisCaptureLevel >= 0) {
+ CS = cast<CapturedStmt>(CS)->getCapturedStmt();
+ }
----------------
No braces
https://reviews.llvm.org/D28753
More information about the cfe-commits
mailing list