[clang] [llvm] [mlir] [OpenMP][OMPIRBuilder] Error propagation across callbacks (PR #112533)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 23 06:49:25 PDT 2024
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 d4dd770289b506a2a0fed6fe4add68048f37748d 568964ea4be35c45d5738cc9f0f4d86abb4560af --extensions cpp,h -- clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/lib/CodeGen/CGStmtOpenMP.cpp llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp llvm/lib/Transforms/IPO/OpenMPOpt.cpp llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
index de472661a4..3afb9d8427 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
@@ -2389,7 +2389,7 @@ public:
/// \return an error, if any were triggered during execution.
using TargetTaskBodyCallbackTy =
function_ref<Error(Value *DeviceID, Value *RTLoc,
- IRBuilderBase::InsertPoint TargetTaskAllocaIP)>;
+ IRBuilderBase::InsertPoint TargetTaskAllocaIP)>;
/// Generate a target-task for the target construct
///
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 780a6117ac..d2e4dc1c85 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -7315,8 +7315,9 @@ emitTargetCall(OpenMPIRBuilder &OMPBuilder, IRBuilderBase &Builder,
OpenMPIRBuilder::TargetKernelArgs KArgs;
- auto TaskBodyCB = [&](Value *DeviceID, Value *RTLoc,
- IRBuilderBase::InsertPoint TargetTaskAllocaIP) -> Error {
+ auto TaskBodyCB =
+ [&](Value *DeviceID, Value *RTLoc,
+ IRBuilderBase::InsertPoint TargetTaskAllocaIP) -> Error {
llvm::OpenMPIRBuilder::InsertPointOrErrorTy AfterIP = [&]() {
// emitKernelLaunch makes the necessary runtime call to offload the
// kernel. We then outline all that code into a separate function
``````````
</details>
https://github.com/llvm/llvm-project/pull/112533
More information about the cfe-commits
mailing list