[Mlir-commits] [mlir] [MLIR][OpenMP] - Fix translation of omp.target when private variables need cleaning up (PR #129205)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Feb 28 00:19:49 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-llvm
@llvm/pr-subscribers-flang-openmp
Author: Pranav Bhandarkar (bhandarkar-pranav)
<details>
<summary>Changes</summary>
This is a simple fix that ensures that the InsertPoint is properly fixed up after we have translated the dealloc region of all privatized variables during translation of omp.target from MLIR to LLVMIR.
Fix for https://github.com/llvm/llvm-project/issues/129202
---
Full diff: https://github.com/llvm/llvm-project/pull/129205.diff
1 Files Affected:
- (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+1)
``````````diff
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 5035551dd6023..32c7c501d03c3 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -4832,6 +4832,7 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
"failed to inline `dealloc` region of `omp.private` "
"op in the target region");
}
+ return builder.saveIP();
}
return InsertPointTy(exitBlock.get(), exitBlock.get()->end());
``````````
</details>
https://github.com/llvm/llvm-project/pull/129205
More information about the Mlir-commits
mailing list