[llvm] [DomTree] Reduce number of hash table lookups (NFC) (PR #73097)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 09:19:10 PST 2023


https://github.com/kuhar approved this pull request.

Thanks for looking into this, the change makes sense to me, especially with the benchmark results linked.

I see @dwblaikie's point about demonstrating that this actually helps with cache lookups, but I think this hits the point of diminishing returns fairly quickly. In the past I tried to do something similar and count the number of DFS nodes visited as a proxy for overall performance. I quickly run into the problems with llvm's statistic class because it's difficult to properly anchor it in highly-generic code like this, and ended up hacking it locally and never upstreaming this counters.
With this kind of complexity in mind, I would side with David if this PR was not backed by any wall time measurements, but it does improve wall time, so I don't have further concerns here. 

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


More information about the llvm-commits mailing list