<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">—cflags and —cxxflags are different in LNT. That looks like a cpp file, so cxxflags will be the one you want. <br><br><div id="AppleMailSignature">💬 from 📱</div><div><br>On Jun 6, 2018, at 10:43 PM, CHINNAM KRISHNA CHAITANYA via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Hi, thanks for the reply.<br></div><div><br></div><div>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). <br></div><div><br></div><div>But I'm trying to get optimization remarks for gcc-loops.cpp in UnitTests/Vectorizer (that is the only cpp file in Vectorizer directory)<br></div><div><br></div><div>I've tried with different tests (like polybench and smallPT) but timeit.c and CMakeCCompilerId are the only .opt.yaml files I'm getting.</div><div><br></div><div>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?</div><div><br></div><div>Thanks in advance.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 6, 2018 at 3:11 AM, Francis Visoiu Mistrih <span dir="ltr"><<a href="mailto:francisvm@yahoo.com" target="_blank">francisvm@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
> On 4 Jun 2018, at 21:49, CHINNAM KRISHNA CHAITANYA via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> 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. <br>
> <br>
> 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<br>
> <br>
> I've tried running it like this:<br>
> <br>
>     lnt runtest test-suite --sandbox SANDBOX --cc /usr/local/bin/clang --test-suite ~/llvm_tests/llvm-test-suite/ --only-test SingleSource/UnitTests/<wbr>Vectorizer/ --only-compile --use-lit ~/llvm/utils/lit/lit.py --cflag '-O3' --cflag '-fvectorize' --cflag '-Rpass-missed=loop-vectorize' --cflag '-Rpass-analysis=loop-<wbr>vectorize' -j 70<br>
> <br>
> 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)<br>
> <br>
> Is it possible to get optimization remarks at all? Or is there some other way to do this?<br>
<br>
</span>clang -fsave-optimization-record should generate a .opt.yaml file with all the optimization remarks emitted.<br>
<br>
You can then read these with the opt-viewer tool (tools/opt-viewer), or just open the YAML files.<br>
<br>
Let me know if you run into any issues,<br>
<br>
— <br>
<span class="HOEnZb"><font color="#888888">Francis<br>
</font></span><span class="im HOEnZb"><br>
> <br>
> Any help is appreciated, thank you.<br>
</span><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</div></div></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a></span><br><span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></span><br></div></blockquote></body></html>