summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterStmt.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-08-13 14:05:43 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-08-13 14:05:43 +0000
commit0ce6360e0efdf12fbecc5a931a43449091e6f5f0 (patch)
tree087ec9e72ccfa67300ffe8f9f80f3b208220ba7c /clang/lib/Serialization/ASTWriterStmt.cpp
parent8d4a6615e17fec9555e44f5ece87fc75900e25d2 (diff)
downloadbcm5719-llvm-0ce6360e0efdf12fbecc5a931a43449091e6f5f0.tar.gz
bcm5719-llvm-0ce6360e0efdf12fbecc5a931a43449091e6f5f0.zip
[OPENMP] Fix emission of the loop doacross constructs.
The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. llvm-svn: 339568
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterStmt.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index 7d14c918af1..0f67312d0bf 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -1898,7 +1898,12 @@ void OMPClauseWriter::VisitOMPScheduleClause(OMPScheduleClause *C) {
}
void OMPClauseWriter::VisitOMPOrderedClause(OMPOrderedClause *C) {
+ Record.push_back(C->getLoopNumIterations().size());
Record.AddStmt(C->getNumForLoops());
+ for (Expr *NumIter : C->getLoopNumIterations())
+ Record.AddStmt(NumIter);
+ for (unsigned I = 0, E = C->getLoopNumIterations().size(); I <E; ++I)
+ Record.AddStmt(C->getLoopCunter(I));
Record.AddSourceLocation(C->getLParenLoc());
}
@@ -2102,13 +2107,15 @@ void OMPClauseWriter::VisitOMPFlushClause(OMPFlushClause *C) {
void OMPClauseWriter::VisitOMPDependClause(OMPDependClause *C) {
Record.push_back(C->varlist_size());
+ Record.push_back(C->getNumLoops());
Record.AddSourceLocation(C->getLParenLoc());
Record.push_back(C->getDependencyKind());
Record.AddSourceLocation(C->getDependencyLoc());
Record.AddSourceLocation(C->getColonLoc());
for (auto *VE : C->varlists())
Record.AddStmt(VE);
- Record.AddStmt(C->getCounterValue());
+ for (unsigned I = 0, E = C->getNumLoops(); I < E; ++I)
+ Record.AddStmt(C->getLoopData(I));
}
void OMPClauseWriter::VisitOMPDeviceClause(OMPDeviceClause *C) {
OpenPOWER on IntegriCloud