aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2025-07-28 07:54:48 -0500
committerGitHub <noreply@github.com>2025-07-28 07:54:48 -0500
commit5dc9937ea910f807d3e7325669053c5740545875 (patch)
treebd8c4375459676f1239ae0f75e161a41b18d1628 /clang/lib/Frontend/CompilerInvocation.cpp
parent9d642b0ec806d13002e2f0b50091ca9656b238e5 (diff)
downloadllvm-5dc9937ea910f807d3e7325669053c5740545875.zip
llvm-5dc9937ea910f807d3e7325669053c5740545875.tar.gz
llvm-5dc9937ea910f807d3e7325669053c5740545875.tar.bz2
[libc] Improve starting indices for GPU allocation (#150432)
Summary: The slots in this allocation scheme are statically allocated. All sizes share the same array of slots, but are given different starting locations to space them apart. The previous implementation used a trivial linear slice. This is inefficient because it provides the more likely allocations (1-1024 bytes) with just as much space as a highly unlikely one (1 MiB). This patch uses a cubic easing function to gradually shrink the gaps. For example, we used to get around 700 free slots for a 16 byte allocation, now we get around 2100 before it starts encroaching on the 32 byte allocation space. This could be improved further, but I think this is sufficient.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions