summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtProfile.cpp
diff options
context:
space:
mode:
authorAlexander Musman <alexander.musman@gmail.com>2015-03-21 10:12:56 +0000
committerAlexander Musman <alexander.musman@gmail.com>2015-03-21 10:12:56 +0000
commit3276a27b5cde44d24b67be07227c2b9daba85196 (patch)
tree02fbc25e178fb90d65521638c57e9acfa9355d92 /clang/lib/AST/StmtProfile.cpp
parente165502ed7675f5c9ce9c0d064df6beed8961224 (diff)
downloadbcm5719-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.cpp10
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);
OpenPOWER on IntegriCloud