Skip to content

Commit 0613454

Browse files
authored
[OpenMP] Fix OpenMPIRBuilder generating incorrect duplicate SrcLocInfo (llvm#100364)
This should further fix some of the incorrect debug info being generated related to llvm#97458
1 parent 3ce6f68 commit 0613454

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3426,11 +3426,6 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
34263426
else
34273427
Config.setGridValue(getGridValue(T, ReductionFunc));
34283428

3429-
uint32_t SrcLocStrSize;
3430-
Constant *SrcLocStr = getOrCreateDefaultSrcLocStr(SrcLocStrSize);
3431-
Value *RTLoc =
3432-
getOrCreateIdent(SrcLocStr, SrcLocStrSize, omp::IdentFlag(0), 0);
3433-
34343429
// Build res = __kmpc_reduce{_nowait}(<gtid>, <n>, sizeof(RedList),
34353430
// RedList, shuffle_reduce_func, interwarp_copy_func);
34363431
// or
@@ -3483,7 +3478,8 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
34833478
Builder.CreatePointerBitCastOrAddrSpaceCast(SarFunc, PtrTy);
34843479
Value *WcFuncCast =
34853480
Builder.CreatePointerBitCastOrAddrSpaceCast(WcFunc, PtrTy);
3486-
Value *Args[] = {RTLoc, ReductionDataSize, RL, SarFuncCast, WcFuncCast};
3481+
Value *Args[] = {SrcLocInfo, ReductionDataSize, RL, SarFuncCast,
3482+
WcFuncCast};
34873483
Function *Pv2Ptr = getOrCreateRuntimeFunctionPtr(
34883484
RuntimeFunction::OMPRTL___kmpc_nvptx_parallel_reduce_nowait_v2);
34893485
Res = Builder.CreateCall(Pv2Ptr, Args);
@@ -3506,7 +3502,7 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::createReductionsGPU(
35063502
Value *KernelTeamsReductionPtr = Builder.CreateCall(
35073503
RedFixedBuferFn, {}, "_openmp_teams_reductions_buffer_$_$ptr");
35083504

3509-
Value *Args3[] = {RTLoc,
3505+
Value *Args3[] = {SrcLocInfo,
35103506
KernelTeamsReductionPtr,
35113507
Builder.getInt32(ReductionBufNum),
35123508
ReductionDataSize,

0 commit comments

Comments
 (0)