[llvm-dev] How to get optimization remarks while testing with lnt in llvm

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] How to get optimization remarks while testing with lnt in llvm

Bruce Hoult via llvm-dev
Hi, I'm new to llvm and am trying to run benchmarks from the test-suite using lnt to check loop-vectorization for various benchmarks.

Test are compiling and executing fine, but I am not getting optimization remarks while using flags like -Rpass-missed=loop-vectorize and -Rpass-analysis=loop-vectorize

I've tried running it like this:

    lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-vectorize' -j 70

This isn't causing any compilation fails, but I haven't been able to get the optimization remarks (either to terminal or to the logs). I've gone through all files generated in SANDBOX for the particular test (using grep to search for the remarks)

Is it possible to get optimization remarks at all? Or is there some other way to do this?

Any help is appreciated, thank you.

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] How to get optimization remarks while testing with lnt in llvm

Bruce Hoult via llvm-dev
Hi,

> On 4 Jun 2018, at 21:49, CHINNAM KRISHNA CHAITANYA via llvm-dev <[hidden email]> wrote:
>
> Hi, I'm new to llvm and am trying to run benchmarks from the test-suite using lnt to check loop-vectorization for various benchmarks.
>
> Test are compiling and executing fine, but I am not getting optimization remarks while using flags like -Rpass-missed=loop-vectorize and -Rpass-analysis=loop-vectorize
>
> I've tried running it like this:
>
>     lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-vectorize' -j 70
>
> This isn't causing any compilation fails, but I haven't been able to get the optimization remarks (either to terminal or to the logs). I've gone through all files generated in SANDBOX for the particular test (using grep to search for the remarks)
>
> Is it possible to get optimization remarks at all? Or is there some other way to do this?

clang -fsave-optimization-record should generate a .opt.yaml file with all the optimization remarks emitted.

You can then read these with the opt-viewer tool (tools/opt-viewer), or just open the YAML files.

Let me know if you run into any issues,


Francis

>
> Any help is appreciated, thank you.
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] How to get optimization remarks while testing with lnt in llvm

Bruce Hoult via llvm-dev
Hi, thanks for the reply.

I've tried adding the '-fsave-optimization-record' flag, but the only optimization records I'm getting belong to timeit.c and CMakeCCompilerId (I'm adding flags to the lnt using --cflag).

But I'm trying to get optimization remarks for gcc-loops.cpp in UnitTests/Vectorizer (that is the only cpp file in Vectorizer directory)

I've tried with different tests (like polybench and smallPT) but timeit.c and CMakeCCompilerId are the only .opt.yaml files I'm getting.

I don't understand why this is happening, aren't all files supposed to be compiled with same flags (so there should be .opt.yaml files for all the files that are being compiled)? Any idea why this is happening?

Thanks in advance.

On Wed, Jun 6, 2018 at 3:11 AM, Francis Visoiu Mistrih <[hidden email]> wrote:
Hi,

> On 4 Jun 2018, at 21:49, CHINNAM KRISHNA CHAITANYA via llvm-dev <[hidden email]> wrote:
>
> Hi, I'm new to llvm and am trying to run benchmarks from the test-suite using lnt to check loop-vectorization for various benchmarks.
>
> Test are compiling and executing fine, but I am not getting optimization remarks while using flags like -Rpass-missed=loop-vectorize and -Rpass-analysis=loop-vectorize
>
> I've tried running it like this:
>
>     lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-vectorize' -j 70
>
> This isn't causing any compilation fails, but I haven't been able to get the optimization remarks (either to terminal or to the logs). I've gone through all files generated in SANDBOX for the particular test (using grep to search for the remarks)
>
> Is it possible to get optimization remarks at all? Or is there some other way to do this?

clang -fsave-optimization-record should generate a .opt.yaml file with all the optimization remarks emitted.

You can then read these with the opt-viewer tool (tools/opt-viewer), or just open the YAML files.

Let me know if you run into any issues,


Francis

>
> Any help is appreciated, thank you.
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] How to get optimization remarks while testing with lnt in llvm

Bruce Hoult via llvm-dev
—cflags and —cxxflags are different in LNT. That looks like a cpp file, so cxxflags will be the one you want. 

💬 from 📱

On Jun 6, 2018, at 10:43 PM, CHINNAM KRISHNA CHAITANYA via llvm-dev <[hidden email]> wrote:

Hi, thanks for the reply.

I've tried adding the '-fsave-optimization-record' flag, but the only optimization records I'm getting belong to timeit.c and CMakeCCompilerId (I'm adding flags to the lnt using --cflag).

But I'm trying to get optimization remarks for gcc-loops.cpp in UnitTests/Vectorizer (that is the only cpp file in Vectorizer directory)

I've tried with different tests (like polybench and smallPT) but timeit.c and CMakeCCompilerId are the only .opt.yaml files I'm getting.

I don't understand why this is happening, aren't all files supposed to be compiled with same flags (so there should be .opt.yaml files for all the files that are being compiled)? Any idea why this is happening?

Thanks in advance.

On Wed, Jun 6, 2018 at 3:11 AM, Francis Visoiu Mistrih <[hidden email]> wrote:
Hi,

> On 4 Jun 2018, at 21:49, CHINNAM KRISHNA CHAITANYA via llvm-dev <[hidden email]> wrote:
>
> Hi, I'm new to llvm and am trying to run benchmarks from the test-suite using lnt to check loop-vectorization for various benchmarks.
>
> Test are compiling and executing fine, but I am not getting optimization remarks while using flags like -Rpass-missed=loop-vectorize and -Rpass-analysis=loop-vectorize
>
> I've tried running it like this:
>
>     lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-vectorize' -j 70
>
> This isn't causing any compilation fails, but I haven't been able to get the optimization remarks (either to terminal or to the logs). I've gone through all files generated in SANDBOX for the particular test (using grep to search for the remarks)
>
> Is it possible to get optimization remarks at all? Or is there some other way to do this?

clang -fsave-optimization-record should generate a .opt.yaml file with all the optimization remarks emitted.

You can then read these with the opt-viewer tool (tools/opt-viewer), or just open the YAML files.

Let me know if you run into any issues,


Francis

>
> Any help is appreciated, thank you.
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev