[flang-commits] [clang] [flang] [llvm] [mlir] [OMPIRBuilder] Pass work loop type in ident flags (PR #189347)
via flang-commits
flang-commits at lists.llvm.org
Mon Mar 30 07:25:03 PDT 2026
Jan =?utf-8?q?André?= Reuter <jan at zyten.de>,
Jan =?utf-8?q?André?= Reuter <jan at zyten.de>,
Jan =?utf-8?q?André?= Reuter <jan at zyten.de>,
Jan =?utf-8?q?André?= Reuter <jan at zyten.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/189347 at github.com>
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,c -- clang/test/OpenMP/cancel_codegen.cpp clang/test/OpenMP/irbuilder_for_iterator.cpp clang/test/OpenMP/irbuilder_for_rangefor.cpp clang/test/OpenMP/irbuilder_for_unsigned.c clang/test/OpenMP/irbuilder_for_unsigned_auto.c clang/test/OpenMP/irbuilder_for_unsigned_down.c clang/test/OpenMP/irbuilder_for_unsigned_dynamic.c clang/test/OpenMP/irbuilder_for_unsigned_dynamic_chunked.c clang/test/OpenMP/irbuilder_for_unsigned_runtime.c clang/test/OpenMP/irbuilder_for_unsigned_static_chunked.c clang/test/OpenMP/irbuilder_nested_parallel_for.c clang/test/OpenMP/irbuilder_unroll_partial_factor_for.c clang/test/OpenMP/irbuilder_unroll_partial_heuristic_constant_for.c clang/test/OpenMP/irbuilder_unroll_partial_heuristic_runtime_for.c clang/test/OpenMP/irbuilder_unroll_unroll_partial_factor.c clang/test/OpenMP/nested_loop_codegen.cpp llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 6f277936a..d97b030b7 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -5490,7 +5490,7 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::applyStaticWorkshareLoop(
Builder.CreateStore(One, PStride);
Value *ThreadNum =
- getOrCreateThreadID(getOrCreateIdent(SrcLocStr, SrcLocStrSize));
+ getOrCreateThreadID(getOrCreateIdent(SrcLocStr, SrcLocStrSize));
OMPScheduleType SchedType =
(LoopType == WorksharingLoopType::DistributeStaticLoop)
@@ -5684,8 +5684,8 @@ OpenMPIRBuilder::applyStaticChunkedWorkshareLoop(
Flag |= OMP_IDENT_FLAG_WORK_DISTRIBUTE;
}
Value *SrcLoc = getOrCreateIdent(SrcLocStr, SrcLocStrSize, Flag);
- Value *ThreadNum = getOrCreateThreadID(
- getOrCreateIdent(SrcLocStr, SrcLocStrSize));
+ Value *ThreadNum =
+ getOrCreateThreadID(getOrCreateIdent(SrcLocStr, SrcLocStrSize));
auto BuildInitCall = [StaticInit, SrcLoc, ThreadNum, PLastIter, PLowerBound,
PUpperBound, PStride, One,
this](Value *SchedulingType, Value *ChunkSize,
@@ -6217,8 +6217,8 @@ OpenMPIRBuilder::applyDynamicWorkshareLoop(DebugLoc DL, CanonicalLoopInfo *CLI,
if (!Chunk)
Chunk = One;
- Value *ThreadNum = getOrCreateThreadID(
- getOrCreateIdent(SrcLocStr, SrcLocStrSize));
+ Value *ThreadNum =
+ getOrCreateThreadID(getOrCreateIdent(SrcLocStr, SrcLocStrSize));
Constant *SchedulingType =
ConstantInt::get(I32Type, static_cast<int>(SchedType));
``````````
</details>
https://github.com/llvm/llvm-project/pull/189347
More information about the flang-commits
mailing list