diff options
author | Dave Pagan <dave.pagan@amd.com> | 2023-12-14 10:24:28 -0600 |
---|---|---|
committer | Dave Pagan <dave.pagan@amd.com> | 2024-03-19 11:01:21 -0500 |
commit | 2ec4fd7a4fc6de0e0b9fc4dd9960806594faf33a (patch) | |
tree | e2d647dd14e49656ca07809399b0064f18a9e54f | |
parent | 85c9855fbab9a99056fc47ee05657aa3242e1829 (diff) | |
download | llvm-2ec4fd7a4fc6de0e0b9fc4dd9960806594faf33a.zip llvm-2ec4fd7a4fc6de0e0b9fc4dd9960806594faf33a.tar.gz llvm-2ec4fd7a4fc6de0e0b9fc4dd9960806594faf33a.tar.bz2 |
Fix formatting issues found by code formatting check in build.myfork/main
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 6 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 11 |
3 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index ac971cd..442662d 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -2658,9 +2658,9 @@ void CGOpenMPRuntime::emitForStaticFinish(CodeGenFunction &CGF, isOpenMPDistributeDirective(DKind) || (DKind == OMPD_target_teams_loop) ? OMP_IDENT_WORK_DISTRIBUTE - : isOpenMPLoopDirective(DKind) - ? OMP_IDENT_WORK_LOOP - : OMP_IDENT_WORK_SECTIONS), + : isOpenMPLoopDirective(DKind) + ? OMP_IDENT_WORK_LOOP + : OMP_IDENT_WORK_SECTIONS), getThreadID(CGF, Loc)}; auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc); if (isOpenMPDistributeDirective(DKind) && diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index f4bf2e1..1a8a14b 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1437,8 +1437,7 @@ void CodeGenFunction::EmitOMPReductionClauseFinal( TeamsLoopCanBeParallel = TTLD->canBeParallelFor(); bool WithNowait = D.getSingleClause<OMPNowaitClause>() || isOpenMPParallelDirective(D.getDirectiveKind()) || - TeamsLoopCanBeParallel || - ReductionKind == OMPD_simd; + TeamsLoopCanBeParallel || ReductionKind == OMPD_simd; bool SimpleReduction = ReductionKind == OMPD_simd; // Emit nowait reduction if nowait clause is present or directive is a // parallel directive (it always has implicit barrier). diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index e6ec3e8..2d92ae3 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -6140,9 +6140,9 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, namespace { /// A 'teams loop' with a nested 'loop bind(parallel)' or generic function /// call in the associated loop-nest cannot be a 'parallel for'. -class TeamsLoopChecker final - : public ConstStmtVisitor<TeamsLoopChecker> { +class TeamsLoopChecker final : public ConstStmtVisitor<TeamsLoopChecker> { Sema &SemaRef; + public: bool teamsLoopCanBeParallelFor() const { return TeamsLoopCanBeParallelFor; } @@ -6198,15 +6198,16 @@ public: } explicit TeamsLoopChecker(Sema &SemaRef) : SemaRef(SemaRef), TeamsLoopCanBeParallelFor(true) {} + private: bool TeamsLoopCanBeParallelFor; }; } // namespace bool Sema::teamsLoopCanBeParallelFor(Stmt *AStmt) { - TeamsLoopChecker Checker(*this); - Checker.Visit(AStmt); - return Checker.teamsLoopCanBeParallelFor(); + TeamsLoopChecker Checker(*this); + Checker.Visit(AStmt); + return Checker.teamsLoopCanBeParallelFor(); } bool Sema::mapLoopConstruct(llvm::SmallVector<OMPClause *> &ClausesWithoutBind, |