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/tools | |
| 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/tools')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 10 |
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); |

