[llvm] [Allocator] Keep bump pointer at a minimum alignment (PR #203718)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 13 16:57:57 PDT 2026


MaskRay wrote:

The clever
```
    // Fast path check. The condition also fails for an empty allocator (End ==
    // nullptr) to avoid a separate null check.
    if (LLVM_LIKELY(uintptr_t(Ptr) + SizeToAllocate - 1 < uintptr_t(End))) {
```

which avoids a separate null check, is actually a regression. Removing it leads to a minor instructions:u decrease in stage2-O0-g https://llvm-compile-time-tracker.com/compare.php?from=a72232481fe7d87056dae9b89d8c2580323a9f39&to=e90305ca61492304c70790c13440cbf1c23f9810&stat=instructions:u

Doing more experiments.

https://github.com/llvm/llvm-project/pull/203718


More information about the llvm-commits mailing list