diff options
| author | ergawy <kareem.ergawy@amd.com> | 2025-11-05 07:19:23 -0600 |
|---|---|---|
| committer | ergawy <kareem.ergawy@amd.com> | 2025-11-05 07:19:50 -0600 |
| commit | c02ae7b635ad6cfc8b698dd30c7979aa29a282bd (patch) | |
| tree | 0a24e17ebe4740633d14c186229084a32368421d | |
| parent | 6f8e953c7f666fe86c6bdc6241e8c10493dbe291 (diff) | |
review comments, Michaelusers/ergawy/allocatable_reduction_irbuilder
| -rw-r--r-- | llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h | 4 | ||||
| -rw-r--r-- | llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h index c54f0d2a20c1..d34fb2a66d0a 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h +++ b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h @@ -1497,6 +1497,7 @@ public: /// reduction op's `alloc` region. For example, for allocatables and arrays, /// this type would be the descriptor/box struct. Type *ByRefAllocatedType; + /// * The by-ref element type is the type of the actual storage needed for /// the data of the allocatable or array. For example, an float allocatable /// of would need some float storage to store intermediate reduction @@ -2054,8 +2055,7 @@ public: /// variable. /// \param IsNoWait Optional flag set if the reduction is /// marked as nowait. - /// \param IsByRef For each reduction clause, whether the reduction is by-ref - /// or not. + /// \param IsByRef For each reduction clause, whether the reduction is by-ref. /// \param IsTeamsReduction Optional flag set if it is a teams /// reduction. /// \param GridValue Optional GPU grid value. diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp index 11519bf04007..6bff6f2f629f 100644 --- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp @@ -2618,7 +2618,7 @@ void OpenMPIRBuilder::emitReductionListCopy( ShuffleSrcAddr = Builder.CreateLoad(Builder.getPtrTy(), ShuffleSrcAddr); { - auto OldIP = Builder.saveIP(); + InsertPointTy OldIP = Builder.saveIP(); Builder.restoreIP(AllocaIP); LocalStorage = Builder.CreateAlloca(ShuffleType); @@ -3720,13 +3720,13 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createReductionsGPU( RedArrayTy, ReductionList, {ConstantInt::get(IndexTy, 0), ConstantInt::get(IndexTy, En.index())}); - auto *PrviateVar = RI.PrivateVariable; + Value *PrivateVar = RI.PrivateVariable; bool IsByRefElem = !IsByRef.empty() && IsByRef[En.index()]; if (IsByRefElem) - PrviateVar = Builder.CreateLoad(RI.ElementType, PrviateVar); + PrivateVar = Builder.CreateLoad(RI.ElementType, PrivateVar); Value *CastElem = - Builder.CreatePointerBitCastOrAddrSpaceCast(PrviateVar, PtrTy); + Builder.CreatePointerBitCastOrAddrSpaceCast(PrivateVar, PtrTy); Builder.CreateStore(CastElem, ElemPtr); } CodeGenIP = Builder.saveIP(); |
