[PATCH] D98606: [NVPTX] CUDA does provide malloc/free since compute capability 2.X
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 14 10:40:01 PDT 2021
jdoerfert created this revision.
jdoerfert added a reviewer: tra.
Herald added subscribers: hiraditya, yaxunl.
Herald added a reviewer: bollu.
jdoerfert requested review of this revision.
Herald added a project: LLVM.
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98606
Files:
llvm/lib/Analysis/TargetLibraryInfo.cpp
Index: llvm/lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -547,6 +547,8 @@
if (T.isNVPTX()) {
TLI.disableAllFunctions();
TLI.setAvailable(LibFunc_nvvm_reflect);
+ TLI.setAvailable(llvm::LibFunc_malloc);
+ TLI.setAvailable(llvm::LibFunc_free);
} else {
TLI.setUnavailable(LibFunc_nvvm_reflect);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98606.330520.patch
Type: text/x-patch
Size: 474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210314/8f42bdc4/attachment.bin>
More information about the llvm-commits
mailing list