[llvm] [mlir] [Flang][OpenMP][MLIR] Attach source location to target/target-data runtime c… (PR #222389)
Abid Qadeer via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 02:21:08 PDT 2026
================
@@ -9835,12 +9858,21 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
llvm::omp::OMPDynGroupprivateFallbackType fallbackType =
getDynGroupprivateFallbackType(targetOp.getDynGroupprivateFallbackAttr());
+ // Pass the target region's source location to the runtime, taken from the
+ // op's own location. Restricted to the host offload path that actually emits
+ // the kernel launch, to avoid creating an unused identifier on the device.
+ llvm::Value *rtLocOverride =
+ (!isTargetDevice && isOffloadEntry)
+ ? getSourceLocIdentFromOp(builder, *ompBuilder, targetOp)
----------------
abidh wrote:
The similar check in convertOmpTargetData only tests isOffloadEntry. I wonder if this is intentional.
https://github.com/llvm/llvm-project/pull/222389
More information about the llvm-commits
mailing list