jayfoad wrote: One more thought: is there a risk of the DenseMaps growing ever larger because we never remove entries from them? Maybe the `merge` function would be a good opportunity to purge useless entries? https://github.com/llvm/llvm-project/pull/162077