[llvm] [SCEV] Increase RewriteMap default size (NFC). (PR #224864)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 02:40:52 PDT 2026


fhahn wrote:

> Starting with a growth size of 64 is excessive compared to most hash tables, which use much smaller initial bucket counts.
> 
> The `SmallDenseMap<*, N>` interface isn't ideal either, as we want to avoid exposing a tunable parameter N. While I've tested alternative layouts, Clang's binary size is highly sensitive to DenseMap layout adjustments. We should probably share the rehash and grow functions across pointer-key DenseMaps (experiment: https://llvm-compile-time-tracker.com/compare.php?from=63225d3616be90ab15b97919ac12ae0ab052ac82&to=1d25beedb8610f37b20ae71d95f209455fb97bae&stat=instructions:u) so that we can make some layout adjustments without worrying about size regression.

Yep, that sounds like a good direction!

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


More information about the llvm-commits mailing list