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

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 09:57:30 PST 2019


brzycki added a comment.

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

> @brzycki Thanks for the tip! Do you know how to create testing .bc from LLVM test-suite for benchmarks?


Hello @MaskRay, test-suite <https://github.com/llvm-mirror/test-suite> has a subdirectory named `LLVMSource` that contains IR variants of tests. However, I see no reference to that sub-directory in the CMake build files and the last update to that directory was in 2012. I have never tried it and have no idea if `lit` can run tests in there. The `LLVMSource/Makefile` does pull in all files in that directory so if it worked you should be able to just add a `*.ll` file there for it to be picked up.

> And how can I benchmark dynamic dominator tree? `CalculateFromScratch` is easy to benchmark as I can just repeatedly run the function analysis `domtree` and discard the result but I don't know how for the dynamic case...

The testing I've done on `Dominators` was as customer to the external API and all the benchmarking I performed was in conjunction with the pass. I don't know of a way to profile just the `DTU`.

There is a directory under test-suite's `MicroBenchmarks` that use the Google benchmark framework <https://github.com/google/benchmark> to time small sections of code. I don't know if that could be easily harnessed to test LLVM internals though. I suspect given test-suite's standalone nature it won't be easy to create a benchmark that relies on LLVM as a library. But I don't know for sure.


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