[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 12:48:03 PDT 2019
ABataev marked 2 inline comments as done.
ABataev added inline comments.
================
Comment at: lib/Analysis/CFG.cpp:4749
// bidirectional, so we need to create temp vector.
- for (Stmt *S : llvm::reverse(llvm::to_vector<8>(
- OMPExecutableDirective::used_clauses_children(D->clauses())))) {
+ SmallVector<Stmt *, 8> Used(
+ OMPExecutableDirective::used_clauses_children(D->clauses()));
----------------
Had to create temp vector explicitly as the implicit one causes use-after-free effect.
================
Comment at: test/Analysis/cfg-openmp.cpp:188
// CHECK-NEXT: [[#TARGET+6]]: [B1.[[#TARGET+5]]] (ImplicitCastExpr, IntegralToBoolean, _Bool)
-// CHECK-NEXT: [[#TARGET+7]]: #pragma omp target depend(in : argc) if(cond)
+// CHECK-NEXT: [[#TARGET+7]]: fp
+// CHECK-NEXT: [[#TARGET+8]]: argc
----------------
In `task` and `target` regions some of the variables might be implicit firstprivate just like in this case.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64765/new/
https://reviews.llvm.org/D64765
More information about the cfe-commits
mailing list