<div dir="ltr">Thanks for the quick reply.<div><br></div><div>`-O0` is too slow with Valgrind and `-O2` is not recommended.  We use `-O1` in Valgrind runs.<br><br>> Use of -O2 and above is not recommended as Memcheck occasionally reports uninitialised-value errors which don't really exist.<br><a href="http://valgrind.org/docs/manual/quick-start.html">http://valgrind.org/docs/manual/quick-start.html</a><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 31, 2018 at 5:34 PM, Michael Kruse <span dir="ltr"><<a href="mailto:llvmdev@meinersbur.de" target="_blank">llvmdev@meinersbur.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What are you trying to achieve? If faster runs is the goal, why not<br>
compile with -O2?<br>
<br>
Michael<br>
<div><div class="h5"><br>
<br>
2018-05-31 16:27 GMT-05:00 M. Chaturvedi via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>:<br>
> Hi,<br>
><br>
> The binary gotten via clang's `-O1` runs much slower (3x) than that gotten<br>
> via GCC's `-O1`.<br>
><br>
> Reproducible with:<br>
><br>
> <a href="https://github.com/m-chaturvedi/test_valgrind_slowdown" rel="noreferrer" target="_blank">https://github.com/m-<wbr>chaturvedi/test_valgrind_<wbr>slowdown</a><br>
><br>
> We are seeing this difference between gcc and clang at other places as well.<br>
><br>
> The `-O0` and `-O2` times are comparable, however.   Are there some compile<br>
> time flags one could add to make the `-O1` times comparable?<br>
><br>
> Apologies if this has been discussed somewhere already.<br>
><br>
> Thank you,<br>
> Mmanu<br>
><br>
</div></div>> ______________________________<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>
</blockquote></div><br></div>