Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Serialization/ASTReaderStmt.cpp
//===- ASTReaderStmt.cpp - Stmt/Expr Deserialization ----------------------===// | //===- ASTReaderStmt.cpp - Stmt/Expr Deserialization ----------------------===// | ||||
Lint: Lint: clang-format not found in user's PATH; not linting file. | |||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
▲ Show 20 Lines • Show All 2,255 Lines • ▼ Show 20 Lines | if (E->hasAssociatedStmt()) | ||||
E->setAssociatedStmt(Record.readSubStmt()); | E->setAssociatedStmt(Record.readSubStmt()); | ||||
} | } | ||||
void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) { | void ASTStmtReader::VisitOMPLoopDirective(OMPLoopDirective *D) { | ||||
VisitStmt(D); | VisitStmt(D); | ||||
// Two fields (NumClauses and CollapsedNum) were read in ReadStmtFromStream. | // Two fields (NumClauses and CollapsedNum) were read in ReadStmtFromStream. | ||||
Record.skipInts(2); | Record.skipInts(2); | ||||
VisitOMPExecutableDirective(D); | VisitOMPExecutableDirective(D); | ||||
if (isOpenMPLoopTransformationDirective(D->getDirectiveKind())) | |||||
return; | |||||
D->setIterationVariable(Record.readSubExpr()); | D->setIterationVariable(Record.readSubExpr()); | ||||
D->setLastIteration(Record.readSubExpr()); | D->setLastIteration(Record.readSubExpr()); | ||||
D->setCalcLastIteration(Record.readSubExpr()); | D->setCalcLastIteration(Record.readSubExpr()); | ||||
D->setPreCond(Record.readSubExpr()); | D->setPreCond(Record.readSubExpr()); | ||||
D->setCond(Record.readSubExpr()); | D->setCond(Record.readSubExpr()); | ||||
D->setInit(Record.readSubExpr()); | D->setInit(Record.readSubExpr()); | ||||
D->setInc(Record.readSubExpr()); | D->setInc(Record.readSubExpr()); | ||||
D->setPreInits(Record.readSubStmt()); | D->setPreInits(Record.readSubStmt()); | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | void ASTStmtReader::VisitOMPParallelDirective(OMPParallelDirective *D) { | ||||
D->setTaskReductionRefExpr(Record.readSubExpr()); | D->setTaskReductionRefExpr(Record.readSubExpr()); | ||||
D->setHasCancel(Record.readInt()); | D->setHasCancel(Record.readInt()); | ||||
} | } | ||||
void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) { | void ASTStmtReader::VisitOMPSimdDirective(OMPSimdDirective *D) { | ||||
VisitOMPLoopDirective(D); | VisitOMPLoopDirective(D); | ||||
} | } | ||||
void ASTStmtReader::VisitOMPTileDirective(OMPTileDirective *D) { | |||||
VisitOMPLoopDirective(D); | |||||
D->setTransformedStmt(Record.readStmt()); | |||||
} | |||||
void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) { | void ASTStmtReader::VisitOMPForDirective(OMPForDirective *D) { | ||||
VisitOMPLoopDirective(D); | VisitOMPLoopDirective(D); | ||||
D->setTaskReductionRefExpr(Record.readSubExpr()); | D->setTaskReductionRefExpr(Record.readSubExpr()); | ||||
D->setHasCancel(Record.readInt()); | D->setHasCancel(Record.readInt()); | ||||
} | } | ||||
void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) { | void ASTStmtReader::VisitOMPForSimdDirective(OMPForSimdDirective *D) { | ||||
VisitOMPLoopDirective(D); | VisitOMPLoopDirective(D); | ||||
▲ Show 20 Lines • Show All 880 Lines • ▼ Show 20 Lines | while (true) { | ||||
case STMT_OMP_SIMD_DIRECTIVE: { | case STMT_OMP_SIMD_DIRECTIVE: { | ||||
unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; | unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; | ||||
unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; | unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; | ||||
S = OMPSimdDirective::CreateEmpty(Context, NumClauses, | S = OMPSimdDirective::CreateEmpty(Context, NumClauses, | ||||
CollapsedNum, Empty); | CollapsedNum, Empty); | ||||
break; | break; | ||||
} | } | ||||
case STMT_OMP_TILE_DIRECTIVE: { | |||||
unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; | |||||
unsigned NumLoops = Record[ASTStmtReader::NumStmtFields + 1]; | |||||
S = OMPTileDirective::CreateEmpty(Context, NumClauses, NumLoops); | |||||
break; | |||||
} | |||||
case STMT_OMP_FOR_DIRECTIVE: { | case STMT_OMP_FOR_DIRECTIVE: { | ||||
unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; | unsigned NumClauses = Record[ASTStmtReader::NumStmtFields]; | ||||
unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; | unsigned CollapsedNum = Record[ASTStmtReader::NumStmtFields + 1]; | ||||
S = OMPForDirective::CreateEmpty(Context, NumClauses, CollapsedNum, | S = OMPForDirective::CreateEmpty(Context, NumClauses, CollapsedNum, | ||||
Empty); | Empty); | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines |
clang-format not found in user's PATH; not linting file.