[libc-commits] [PATCH] D151735: [libc] Implement basic `malloc` and `free` support on the GPU
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jun 5 11:00:31 PDT 2023
sivachandra added a comment.
Non GPU parts LGTM. Just a couple of minor inline comments.
================
Comment at: libc/src/stdlib/CMakeLists.txt:247
if(LLVM_LIBC_INCLUDE_SCUDO)
set(SCUDO_DEPS "")
----------------
Instead of spreading out the GPU conditionals, can we do this:
```
if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
...
elseif(LLVM_LIBC_INCLUDE_SCUDO)
...
else()
...
endif()
```
================
Comment at: libc/test/src/stdlib/CMakeLists.txt:300
+ # Only the GPU has an in-tree 'malloc' implementation.
+ if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
+ add_libc_test(
----------------
In the interest of eliminating unnecessary conditionals, will it fail on linux if you remove this conditional?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151735/new/
https://reviews.llvm.org/D151735
More information about the libc-commits
mailing list