[llvm] [MemDep] Optimize SortNonLocalDepInfoCache sorting strategy for large caches with few unsorted entries (PR #143107)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 13 04:34:49 PDT 2025


DingdWang wrote:

> Please do not reformat parts of the file you do not modify.
> 
> Why does this cache use a sorted vector at all? Would it be possible to convert it to a DenseMap instead?

1. have reverted reformat of other parts
2. Honestly, I’m not sure why a sorted vector was chosen here originally. I do think switching to a DenseMap is worth considering. The overall performance impact needs to be evaluated experimentally. Since these changes are relatively complex, I believe it would be better to explore this in a separate follow-up patch in the future.

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


More information about the llvm-commits mailing list