Skip to content
Unverified Commit a5655093 authored by Nathan James's avatar Nathan James
Browse files

[ADT] Use Empty Base Optimization for Allocators

In D94439, BumpPtrAllocator changed its implementation to use an empty base optimization for the underlying allocator.
This patch builds on that by extending its functionality to more classes as well as enabling the underlying allocator to be a reference type, something not currently possible as you can't derive from a reference.

The main place this sees use is in StringMaps which often use the default MallocAllocator, yet have to pay the size of a pointer for no reason.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D129206
parent 1ce3f945
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment