[llvm] [IR] Split the attribute pool by kind. NFC (PR #221620)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 01:40:53 PDT 2026


MaskRay wrote:

> LGTM. I suppose the biggest win is that enum attributes (which should be the most common by far) are an array now?

I agree. In this case, it's a win for code complexity too. Even without the array, replacing `FoldingSet` with `UniquingSet` is an improvement. 

In general FoldingSet is for scenarios where the key is wide, polymorphic, or built at many call sites.
<img width="1424" height="1111" alt="screenshot-20260907-013724" src="https://github.com/user-attachments/assets/24b60e84-70ca-40ab-9b61-0375971a099a" />


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


More information about the llvm-commits mailing list