[Openmp-commits] [PATCH] D129787: [OpenMP][AMDGPU] Add the support for `malloc` and `free` for AMDGPU

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 14 12:30:36 PDT 2022


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LG, minor nits



================
Comment at: openmp/libomptarget/DeviceRTL/include/Types.h:45
 static_assert(sizeof(uint64_t) == 8, "type size mismatch");
+static_assert(sizeof(size_t) == 8, "type size mismatch");
 ///}
----------------
We don't require 8 byte size_t, do we? size_t is by definition supposed to be the sizeof result type, not 8 byte.


================
Comment at: openmp/libomptarget/DeviceRTL/src/Memory.cpp:24
+__ockl_dm_alloc(unsigned long long __size);
+__attribute__((leaf)) void __ockl_dm_dealloc(unsigned long long __addr);
+
----------------
Rename the arguments.

Unrelated: I really have no words for dealloc taking a unsigned long long.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129787/new/

https://reviews.llvm.org/D129787



More information about the Openmp-commits mailing list