llvm-project
e3ef2d96 - [SmallPtrSet] Optimize Grow and inline FindBucketFor. NFC (#206304)

Commit
16 days ago
[SmallPtrSet] Optimize Grow and inline FindBucketFor. NFC (#206304) During rehashing every key is known absent, so skip the equal-key comparison. DenseMap got a similar optimization in #200595 FindBucketFor is then only used by insert_imp_big; inline its probe loop there. The loop takes 7 inst instead of 9 in the clang-generated assembly after removing the two `LLVM_LIKELY`.
Author
Parents
Loading