[PATCH] D28753: [OpenMP] Codegen support for 'target parallel' on the host.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 18 04:40:37 PST 2017


ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.

LG with nits



================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:848-860
+    const StringRef outlinedHelperName, const RegionCodeGenTy &CodeGen) {
   assert(ThreadIDVar->getType()->isPointerType() &&
          "thread id variable must be of type kmp_int32 *");
-  const CapturedStmt *CS = cast<CapturedStmt>(D.getAssociatedStmt());
   CodeGenFunction CGF(CGM, true);
   bool HasCancel = false;
   if (auto *OPD = dyn_cast<OMPParallelDirective>(&D))
     HasCancel = OPD->hasCancel();
----------------
s/outlinedHelperName/OutlinedHelperName/g


================
Comment at: lib/Sema/SemaOpenMP.cpp:1933-1937
+  StmtResult SR = S;
+  int ThisCaptureLevel =
+      getOpenMPCaptureLevels(DSAStack->getCurrentDirective());
+  while (--ThisCaptureLevel >= 0)
+    SR = ActOnCapturedRegionEnd(SR.get());
----------------
Could you move this code to `CaptureRegionUnwinderRAII`?


https://reviews.llvm.org/D28753





More information about the cfe-commits mailing list