This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-O1 runtime difference between gcc and clang
- From: "M. Chaturvedi" <mmanu dot chaturvedi at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 8 Jun 2018 15:54:35 -0400
- Subject: -O1 runtime difference between gcc and clang
Hi,
The binary gotten via clang's `-O1` runs much slower (3x) than that gotten
via GCC's `-O1`.
Reproducible with:
https://github.com/m-chaturvedi/test_valgrind_slowdown
We are seeing this difference between gcc and clang at other places as well.
The `-O0` and `-O2` times are comparable, however. Are there some compile
time flags one could add to make the `-O1` times comparable?
I asked this question at LLVM, but they don't seem too interested, so I was
wondering if someone could help me here.
http://lists.llvm.org/pipermail/llvm-dev/2018-May/123708.html
Thank you,
Mmanu