diff options
author | Dave Pagan <dave.pagan@amd.com> | 2023-11-15 15:17:37 -0600 |
---|---|---|
committer | Dave Pagan <dave.pagan@amd.com> | 2024-03-19 10:12:11 -0500 |
commit | 58974446a929701a64e952b01dab32d773f34ae1 (patch) | |
tree | 48134f5354c5cf360ca603d6a08aa9fb3fc24434 | |
parent | 82509a768d03d18051b2ff05e6e924011d443662 (diff) | |
download | llvm-58974446a929701a64e952b01dab32d773f34ae1.zip llvm-58974446a929701a64e952b01dab32d773f34ae1.tar.gz llvm-58974446a929701a64e952b01dab32d773f34ae1.tar.bz2 |
Fix formatting issues found by code formatting check.
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 12 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
3 files changed, 9 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index bd32881..ac971cd 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -2656,7 +2656,7 @@ void CGOpenMPRuntime::emitForStaticFinish(CodeGenFunction &CGF, llvm::Value *Args[] = { emitUpdateLocation(CGF, Loc, isOpenMPDistributeDirective(DKind) || - (DKind == OMPD_target_teams_loop) + (DKind == OMPD_target_teams_loop) ? OMP_IDENT_WORK_DISTRIBUTE : isOpenMPLoopDirective(DKind) ? OMP_IDENT_WORK_LOOP diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 325027b..0a4c1f9 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -7973,9 +7973,9 @@ static void emitTargetTeamsGenericLoopRegionAsParallel( CGF.EmitOMPReductionClauseFinal(S, /*ReductionKind=*/OMPD_teams); }; DEBUG_WITH_TYPE(TTL_CODEGEN_TYPE, - CGF.CGM.emitTargetTeamsLoopCodegenStatus( - TTL_CODEGEN_TYPE " as parallel for", S, - CGF.CGM.getLangOpts().OpenMPIsTargetDevice)); + CGF.CGM.emitTargetTeamsLoopCodegenStatus( + TTL_CODEGEN_TYPE " as parallel for", S, + CGF.CGM.getLangOpts().OpenMPIsTargetDevice)); emitCommonOMPTeamsDirective(CGF, S, OMPD_distribute_parallel_for, CodeGenTeams); emitPostUpdateForReductionClause(CGF, S, @@ -8003,9 +8003,9 @@ static void emitTargetTeamsGenericLoopRegionAsDistribute( CGF.EmitOMPReductionClauseFinal(S, /*ReductionKind=*/OMPD_teams); }; DEBUG_WITH_TYPE(TTL_CODEGEN_TYPE, - CGF.CGM.emitTargetTeamsLoopCodegenStatus( - TTL_CODEGEN_TYPE " as distribute", S, - CGF.CGM.getLangOpts().OpenMPIsTargetDevice)); + CGF.CGM.emitTargetTeamsLoopCodegenStatus( + TTL_CODEGEN_TYPE " as distribute", S, + CGF.CGM.getLangOpts().OpenMPIsTargetDevice)); emitCommonOMPTeamsDirective(CGF, S, OMPD_distribute, CodeGen); emitPostUpdateForReductionClause(CGF, S, [](CodeGenFunction &) { return nullptr; }); diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 9700792..3723b61 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -7586,9 +7586,7 @@ class TeamsLoopChecker final : public ConstStmtVisitor<TeamsLoopChecker> { public: TeamsLoopChecker(CodeGenModule &CGM) : CGM(CGM), TeamsLoopCanBeParallelFor{true} {} - bool teamsLoopCanBeParallelFor() const { - return TeamsLoopCanBeParallelFor; - } + bool teamsLoopCanBeParallelFor() const { return TeamsLoopCanBeParallelFor; } // Is there a nested OpenMP loop bind(parallel) void VisitOMPExecutableDirective(const OMPExecutableDirective *D) { if (D->getDirectiveKind() == llvm::omp::Directive::OMPD_loop) { @@ -7651,7 +7649,7 @@ bool CodeGenModule::teamsLoopCanBeParallelFor(const OMPExecutableDirective &D) { if (D.getDirectiveKind() != llvm::omp::Directive::OMPD_target_teams_loop) return false; assert(D.hasAssociatedStmt() && - "Loop directive must have associated statement."); + "Loop directive must have associated statement."); TeamsLoopChecker Checker(*this); Checker.Visit(D.getAssociatedStmt()); return Checker.teamsLoopCanBeParallelFor(); |