[llvm] [llvm] Replace SmallSet with SmallPtrSet (NFC) (PR #154068)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 01:30:18 PDT 2025


jayfoad wrote:

> Since relying on the redirection
> doesn't improve readability, this patch replaces SmallSet with
> SmallPtrSet for pointer element types.

I don't really understand the motivation. Why is writing `SmallPtrSet<T*>` _better_ than `SmallSet<T*>`? Are you planning to remove the redirection?

As an alternative, how about removing explicit use of SmallPtrSet and always relying on SmallSet being specialized for pointer types? (Or do they have different performance characteristics, so you might want to explicitly choose one or the other?)

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


More information about the llvm-commits mailing list