This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2][v3] Drop excess size used for run time allocated stack variables.
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: vogt at linux dot vnet dot ibm dot com, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Wed, 8 Jun 2016 13:20:12 +0200
- Subject: Re: [PATCH 1/2][v3] Drop excess size used for run time allocated stack variables.
- Authentication-results: sourceware.org; auth=none
- References: <20160429221242 dot GA2205 at linux dot vnet dot ibm dot com> <e128d673-061b-5b9a-90ef-84613093bf90 at redhat dot com> <20160503141753 dot GA17351 at linux dot vnet dot ibm dot com> <20160525133054 dot GA6938 at linux dot vnet dot ibm dot com>
On 05/25/2016 03:30 PM, Dominik Vogt wrote:
* explow.c (allocate_dynamic_stack_space): Simplify knowing that
MUST_ALIGN was always true and extra_align ist always BITS_PER_UNIT.
I tried to do some archaeology to find out how the code came to look the
way it currently does. A relevant message appears to be
https://gcc.gnu.org/ml/gcc-patches/2011-01/msg00836.html
There's some discussion about how STACK_POINT_OFFSET shouldn't cause us
to have to align, and postponing that optimization to gcc-4.7. Since
STACK_POINTER_OFFSET should be constant, it ought to be easy enough to
take it into account.
So, I'm undecided. Your cleanup is valid as the code stands right now,
but I'm undecided whether we shouldn't fix the potentially unnecessary
extra alignment instead.
Bernd