[llvm] [SelectionDAG] Stop storing EVTs in a function scoped static std::set. (PR #118715)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 17:30:57 PST 2024


topperc wrote:

> > Is there some reason you're switching to FoldingSet, instead of just sticking with std::set? Not sure what the performance of FoldingSet is like, but any performance difference is probably related to that switch, not whether the std::set is a global.
> 
> Only because the FoldingSet already existed for the multiple element case so it was easy to reuse. I'll try with a std::set.

Looks like moving the std::set into SelectionDAG gives better results. https://llvm-compile-time-tracker.com/compare.php?from=2fea1ccb6221238674562533684c51b63de248d4&to=76f11748278f882b13ed351c166797511e0ae825&stat=instructions:u

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


More information about the llvm-commits mailing list