[PATCH] D58327: [Dominators] Simplify and optimize path compression used in link-eval forest.

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


kuhar added a comment.

In D58327#1401992 <https://reviews.llvm.org/D58327#1401992>, @MaskRay wrote:

> Comparing the results of `opt -passes='default<O3>,function(print<domtree>)' -disable-output` (llvm-link.bc,llvm-as.bc,sqlite3.bc,...) give some more confidence.
>
> I don't expect this patch to have perceivable performance boost.. Maybe there is a bit. Ran `time opt -domtree -disable-output < ~/llvm/GLLVM/bin/clang-9.bc` several times with and without the patch:
>
> Before: 1:05.27 1:05.45 1:05.46 1:06.96 1:05.25 1:04.58
>  After: 1:05.71 1:04.49 1:03.50 1:05.14 1:05.04 1:03.77


If you are building DT/PDT once per function, then your times is going to be dominated by reading bitcode, parsing it, building a module, verifying it, etc. -- I suggest to visit each function a number of times (say 1000), in randomized order, and measure time of a single pass / tool that does it.
In addition, make sure that your performance governor is set to performance and that you pin the process to a single cpu core with its sibling disabled. (like in https://llvm.org/docs/Benchmarking.html#linux). Benchmarking on x86 is hard.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58327





More information about the llvm-commits mailing list