summaryrefslogtreecommitdiffstats
path: root/clang/tools
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/tools
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/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 1b41e0066f5..b47128785c8 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2031,7 +2031,17 @@ void OMPClauseEnqueue::VisitOMPReductionClause(const OMPReductionClause *C) {
}
void OMPClauseEnqueue::VisitOMPLinearClause(const OMPLinearClause *C) {
VisitOMPClauseList(C);
+ for (const auto *E : C->inits()) {
+ Visitor->AddStmt(E);
+ }
+ for (const auto *E : C->updates()) {
+ Visitor->AddStmt(E);
+ }
+ for (const auto *E : C->finals()) {
+ Visitor->AddStmt(E);
+ }
Visitor->AddStmt(C->getStep());
+ Visitor->AddStmt(C->getCalcStep());
}
void OMPClauseEnqueue::VisitOMPAlignedClause(const OMPAlignedClause *C) {
VisitOMPClauseList(C);
OpenPOWER on IntegriCloud