[llvm] [MC] Allocate MCFragment with a bump allocator (PR #96402)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 22 16:09:39 PDT 2024


MaskRay wrote:

Interesting, so there is tiny instruction:u decrease with some max-rss increase, significant for `stage1-ReleaseLTO-g (link only)`.

This increase likely stems from LTO optimizations allocating objects on the heap that overlap significantly with newly created MCDataFragment instances.
The bump allocator eliminates this overlap and increases max-rss.
This can be mitigated if we can identify the heap objects and switch the optimization pass(es) to bump allocators.

This bump allocator change opens doors for further performance (e.g. more elegant -disable-free for fragments) and max-rss improvement, so I want to keep it despite the ReleaseLTO max-rss regression...
We can view this as using the previous saved credit from max-rss optimizations to unlock future gains...


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


More information about the llvm-commits mailing list