Re: -march=x86_64 -mtune=generic question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 26, 2022 at 3:12 AM Andrew Haley via Gcc-help <
gcc-help@xxxxxxxxxxx> wrote:

> On 5/25/22 19:58, Tom Kacvinsky via Gcc-help wrote:
> > Does anyone have a quick rundown on what would have changed between GCC
> > 8.3.0 and 12.1.0 in terms of what -mtune=generic does for optimizations?
>
> There was a vast amount of work done on many things, so we can't easily
> say what affected you. Generally speaking GCC gets better release to
> release,
> but bear in mind that compiler optimizations are often based on heuristics.
> That is to say, they make code better on average, but sometimes they might
> make things worse. If your degradation is slight overall, there might be an
> actual regression in the compiler, but chances are you just got unlucky.
>


I did have an idea of diffing the gcc/config/i386 folder between the 8.3
and 12.1
 release tags, but that gave a _lot_ of stuff about support for AVX512.

A colleague of mine reminded me of this thread:

slowdown with -std=gnu18 with respect to -std=c99

So I checked what the default C standard for GCC 8.3.0 is (gnu11) and 12.1.0
(gnu17).  So I used -std=c99 with the GCC 12.1 build of our code, and things
went back to normal (and sometimes a teensy bit better).

For what it's worth, the performance issue was death by a thousand cuts -
there
was no glaring hotspot, and least by looking at callgrind output.

Tom



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux