This is the mail archive of the
mailing list for the GCC project.
Re: Overwhelmed by GCC frustration
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: David Brown <david at westcontrol dot com>
- Cc: Eric Gallager <egall at gwmail dot gwu dot edu>, Richard Biener <richard dot guenther at gmail dot com>, Andrew Haley <aph at redhat dot com>, Oleg Endo <oleg dot endo at t-online dot de>, Georg-Johann Lay <avr at gjlay dot de>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Aug 2017 08:54:30 -0500
- Subject: Re: Overwhelmed by GCC frustration
- Authentication-results: sourceware.org; auth=none
- References: <597F2FB4.email@example.com> <firstname.lastname@example.org> <email@example.com> <CAFiYyc2nPd18jEcUfQnf4UXOm4WTcS2RVMnMbs1+ezKWD_5obA@mail.gmail.com> <CAMfHzOtL1XdmJa4GnfH5FCKN3QZpzv1CJazOWfbavw2iOrFkKQ@mail.gmail.com> <59806AF6.firstname.lastname@example.org>
On Tue, Aug 01, 2017 at 01:50:14PM +0200, David Brown wrote:
> I would not expect that to be good at all. With no optimisation (-O0),
> gcc produces quite poor code - local variables are not put in registers
> or "optimised away", there is no strength reduction, etc. For an
> architecture like the AVR with a fair number of registers (32, albeit
> 8-bit registers) and relatively inefficient stack access, -O0 produces
> /terrible/ code.
-Og is better though (better than any other -O for this test at least).
The regression happened before 4.7, it seems the big jump was with 4.6?
So what happened there? This seems to happen on x86 as well, maybe