[all-commits] [llvm/llvm-project] 10445a: [libc] Efficiently implement 'realloc' for AMDGPU ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Jun 30 06:40:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 10445acfa64a80800272e09f70be4799877a237f
      https://github.com/llvm/llvm-project/commit/10445acfa64a80800272e09f70be4799877a237f
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M libc/src/__support/GPU/allocator.cpp
    M libc/src/__support/GPU/allocator.h
    M libc/src/stdlib/gpu/realloc.cpp
    M libc/test/integration/src/stdlib/gpu/CMakeLists.txt
    A libc/test/integration/src/stdlib/gpu/realloc.cpp

  Log Message:
  -----------
  [libc] Efficiently implement 'realloc' for AMDGPU devices (#145960)

Summary:
Now that we have `malloc` we can implement `realloc` efficiently. This
uses the known chunk sizes to avoid unnecessary allocations. We just
return nullptr for NVPTX. I'd remove the list for the entrypoint but
then the libc++ code would stop working. When someone writes the NVPTX
support this will be trivial.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list