This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -O1 runtime difference between gcc and clang
- From: Andrew Haley <aph at redhat dot com>
- To: "M. Chaturvedi" <mmanu dot chaturvedi at gmail dot com>, gcc-help at gcc dot gnu dot org
- Date: Sun, 10 Jun 2018 14:14:08 +0100
- Subject: Re: -O1 runtime difference between gcc and clang
- References: <CAMM6KD-V7ouy0=sREQYYmAFkOkbTu6dEgFxTbnK9ayYXxxW00A@mail.gmail.com>
On 06/08/2018 08:54 PM, M. Chaturvedi wrote:
> 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
I guess this seems like an odd question to ask. -O1 is basically all
of the optimizations that don't take a long while to run: generate
decent-quality code without taking a long while to do it. This
precludes most optimizations that have seriously non-linear time or
space complexity.
Why would you (or anyone) want anything else of -O1? Unless someone
has already done the comparative research, it's going to be hard to
find enough data to answer your question.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671