llvm-project
1b0553c9 - [libc++] Use _BitInt and __builtin_popcountg in bitset::count() (#160679)

Commit
84 days ago
[libc++] Use _BitInt and __builtin_popcountg in bitset::count() (#160679) This has multiple benefits: 1) The compiler has to do way less work to figure out things fold into a simple `popcount`, improving compile times quite a bit 2) The compiler inlines better, since the compile doesn't have to do complicated optimizations to get to the same point. Looking at the pipeline, it seems that without this, LLVM has to go all the way to GVN to get to the same code as there is after the first InstCombine pass with this change. Currently this applies only to `bitset`s with at most 64 bits, but that is by far the most common case.
Author
Parents
Loading