-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[OpenMP] Fix OpenMPIRBuilder generating incorrect duplicate SrcLocInfo #100364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-flang-openmp Author: Akash Banerjee (TIFitis) ChangesThis should further fix some of the incorrect debug info being generated related to #97458 Full diff: https://github.com/llvm/llvm-project/pull/100364.diff 1 Files Affected:
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 98da6e2efcb5c..5f71682627a19 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -3426,11 +3426,6 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
else
Config.setGridValue(getGridValue(T, ReductionFunc));
- uint32_t SrcLocStrSize;
- Constant *SrcLocStr = getOrCreateDefaultSrcLocStr(SrcLocStrSize);
- Value *RTLoc =
- getOrCreateIdent(SrcLocStr, SrcLocStrSize, omp::IdentFlag(0), 0);
-
// Build res = __kmpc_reduce{_nowait}(<gtid>, <n>, sizeof(RedList),
// RedList, shuffle_reduce_func, interwarp_copy_func);
// or
@@ -3483,7 +3478,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
Builder.CreatePointerBitCastOrAddrSpaceCast(SarFunc, PtrTy);
Value *WcFuncCast =
Builder.CreatePointerBitCastOrAddrSpaceCast(WcFunc, PtrTy);
- Value *Args[] = {RTLoc, ReductionDataSize, RL, SarFuncCast, WcFuncCast};
+ Value *Args[] = {SrcLocInfo, ReductionDataSize, RL, SarFuncCast, WcFuncCast};
Function *Pv2Ptr = getOrCreateRuntimeFunctionPtr(
RuntimeFunction::OMPRTL___kmpc_nvptx_parallel_reduce_nowait_v2);
Res = Builder.CreateCall(Pv2Ptr, Args);
@@ -3506,7 +3501,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
Value *KernelTeamsReductionPtr = Builder.CreateCall(
RedFixedBuferFn, {}, "_openmp_teams_reductions_buffer_$_$ptr");
- Value *Args3[] = {RTLoc,
+ Value *Args3[] = {SrcLocInfo,
KernelTeamsReductionPtr,
Builder.getInt32(ReductionBufNum),
ReductionDataSize,
|
Could we merge this with #100358? We're going to need to backport this and it's much easier when it's a single commit. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
3765bce
to
fad41e2
Compare
#100364) Summary: This should further fix some of the incorrect debug info being generated related to #97458 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250639
llvm#100364) This should further fix some of the incorrect debug info being generated related to llvm#97458
llvm#100364) This should further fix some of the incorrect debug info being generated related to llvm#97458
This should further fix some of the incorrect debug info being generated related to #97458