[llvm-branch-commits] [llvm] [OpenMP][OMPIRBuilder] Add device shared memory allocation support (PR #150923)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 23 03:43:20 PST 2026
================
@@ -6657,6 +6657,33 @@ CallInst *OpenMPIRBuilder::createOMPFree(const LocationDescription &Loc,
return Builder.CreateCall(Fn, Args, Name);
}
+CallInst *OpenMPIRBuilder::createOMPAllocShared(const LocationDescription &Loc,
+ Type *VarType,
+ const Twine &Name) {
+ IRBuilder<>::InsertPointGuard IPG(Builder);
+ updateToLocation(Loc);
+
+ const DataLayout &DL = M.getDataLayout();
+ Value *Args[] = {Builder.getInt64(DL.getTypeStoreSize(VarType))};
----------------
skatrak wrote:
Thanks for the suggestion, done!
https://github.com/llvm/llvm-project/pull/150923
More information about the llvm-branch-commits
mailing list