I do some change on a pass of LLVM optimization pass, and I want to test it by using test-suite.
I know there are some caches
in test-suite which contains O3.cmake
, etc. But I think they are passed to clang
instead of opt
.
I want to compare the performance of two executables which are passed an optimization pass with or without my change.
Maybe the compile process is like this:
opt -S -passes=the_pass_with_change input.ll -o output1.ll
opt -S -passes=the_pass_without_change input.ll -o output2.ll
llc output1.ll
llc output2.ll
clang output1.s -o output1.exe
clang output2.s -o output2.exe
# Compare the performance of two executable files
But the processes needs to apply on the whole test-suite.
How should I do that?
fhahn
May 2, 2022, 2:40pm
2
I do some change on a pass of LLVM optimization pass, and I want to test it by using test-suite.
One way to do that is to place your pass in the default pass pipeline and compare the performance of the test suite with a Clang that uses your pass in the pipeline vs a clang without your pass.
The change a mention means I do some modification on optimization algorithm instead of the orders or the numbers.
For example: I change the logic in instcombine
and I want to compare the performance of executables with or without this change.
Sorry for asking so briefly.
fhahn
May 2, 2022, 2:58pm
4
Right, then the most realistic measurement should be comparing clang with your changes vs clang without your changes.
So, the comparison of a single optimization pass is not a good evaluation for compiler optimization, right?