diff options
author | Alexander Musman <alexander.musman@gmail.com> | 2015-03-21 10:12:56 +0000 |
---|---|---|
committer | Alexander Musman <alexander.musman@gmail.com> | 2015-03-21 10:12:56 +0000 |
commit | 3276a27b5cde44d24b67be07227c2b9daba85196 (patch) | |
tree | 02fbc25e178fb90d65521638c57e9acfa9355d92 /clang/lib/AST/StmtProfile.cpp | |
parent | e165502ed7675f5c9ce9c0d064df6beed8961224 (diff) | |
download | bcm5719-llvm-3276a27b5cde44d24b67be07227c2b9daba85196.tar.gz bcm5719-llvm-3276a27b5cde44d24b67be07227c2b9daba85196.zip |
[OPENMP] CodeGen of the 'linear' clause for the 'omp simd' directive.
The linear variable is privatized (similar to 'private') and its
value on current iteration is calculated, similar to the loop
counter variables.
Differential revision: http://reviews.llvm.org/D8375
llvm-svn: 232890
Diffstat (limited to 'clang/lib/AST/StmtProfile.cpp')
-rw-r--r-- | clang/lib/AST/StmtProfile.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtProfile.cpp b/clang/lib/AST/StmtProfile.cpp index d1f25d63b3f..900ff3abe3a 100644 --- a/clang/lib/AST/StmtProfile.cpp +++ b/clang/lib/AST/StmtProfile.cpp @@ -359,7 +359,17 @@ void OMPClauseProfiler::VisitOMPReductionClause( } void OMPClauseProfiler::VisitOMPLinearClause(const OMPLinearClause *C) { VisitOMPClauseList(C); + for (auto *E : C->inits()) { + Profiler->VisitStmt(E); + } + for (auto *E : C->updates()) { + Profiler->VisitStmt(E); + } + for (auto *E : C->finals()) { + Profiler->VisitStmt(E); + } Profiler->VisitStmt(C->getStep()); + Profiler->VisitStmt(C->getCalcStep()); } void OMPClauseProfiler::VisitOMPAlignedClause(const OMPAlignedClause *C) { VisitOMPClauseList(C); |