[PATCH] D58373: [Dominators] Avoid potentially quadratic std::is_permutation

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 06:22:32 PST 2019


kuhar added a comment.

`Roots.size()` is only > 1 for the PostDominatorTree, and I'd expect it to be small (< 100) on virtually all functions. `is_permulation` was used in the original code because it doesn't allocate and should be cheaper for small trees.

Do you have some statistics on the size of Roots? At what size does SmallPtrSet start to outperform `is_permuatation`?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58373/new/

https://reviews.llvm.org/D58373





More information about the llvm-commits mailing list