[PATCH] D81478: [OPENMP50]Codegen for scan directives in parallel for regions.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 12:05:19 PDT 2020


ABataev marked an inline comment as done.
ABataev added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3627
+      emitScanBasedDirective(CGF, S, NumIteratorsGen, FirstGen, SecondGen);
+    } else {
+      OMPCancelStackRAII CancelRegion(CGF, OMPD_parallel_for, S.hasCancel());
----------------
jdoerfert wrote:
> This looks pretty much like D81658, right? Could we avoid the duplication and maybe use a templated function (or something else)?
The duplication is quite small. Here we don't need to check for lastprivates update, we need to check for the cancellation region. I don't think that the outlined functions are going to be much simpler and easier to read.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81478/new/

https://reviews.llvm.org/D81478





More information about the cfe-commits mailing list