[clang][OpenMP] Propagate debug location to OMPIRBuilder reduction codegen#100358
Merged
[clang][OpenMP] Propagate debug location to OMPIRBuilder reduction codegen#100358
Conversation
…odegen This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes llvm#97428
Member
|
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Jan Leyonberg (jsjodin) ChangesThis patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes #97428 Full diff: https://github.com/llvm/llvm-project/pull/100358.diff 1 Files Affected:
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
index fb71b27de9cd0..835662e6cd0a3 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
@@ -1652,6 +1652,7 @@ static llvm::Value *castValueToType(CodeGenFunction &CGF, llvm::Value *Val,
/// Finally, a call is made to '__kmpc_nvptx_parallel_reduce_nowait_v2' to
/// reduce across workers and compute a globally reduced value.
///
+
void CGOpenMPRuntimeGPU::emitReduction(
CodeGenFunction &CGF, SourceLocation Loc, ArrayRef<const Expr *> Privates,
ArrayRef<const Expr *> LHSExprs, ArrayRef<const Expr *> RHSExprs,
@@ -1694,7 +1695,8 @@ void CGOpenMPRuntimeGPU::emitReduction(
CGF.AllocaInsertPt->getIterator());
InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(),
CGF.Builder.GetInsertPoint());
- llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP);
+ llvm::OpenMPIRBuilder::LocationDescription OmpLoc(
+ CodeGenIP, CGF.SourceLocToDebugLoc(Loc));
llvm::SmallVector<llvm::OpenMPIRBuilder::ReductionInfo> ReductionInfos;
CodeGenFunction::OMPPrivateScope Scope(CGF);
|
Contributor
|
Is that the right issue? |
jsjodin
commented
Jul 24, 2024
Contributor
Author
jsjodin
left a comment
There was a problem hiding this comment.
Remove added line
jhuber6
approved these changes
Jul 24, 2024
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 24, 2024
…odegen (llvm#100358) This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes llvm#97458 (cherry picked from commit 5b15d9c)
yuxuanchen1997
pushed a commit
that referenced
this pull request
Jul 25, 2024
…odegen (#100358) Summary: This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes #97458 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250701
searlmc1
pushed a commit
to ROCm/llvm-project
that referenced
this pull request
Apr 17, 2025
…odegen (llvm#100358) This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes llvm#97458
jrbyrnes
pushed a commit
to jrbyrnes/llvm-project
that referenced
this pull request
Apr 29, 2025
…odegen (llvm#100358) This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes llvm#97458
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch propagates the debug location from Clang to the OpenMPIRBuilder.
Fixes #97458