This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/2][v3] Drop excess size used for run time allocated stack variables.
- From: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: 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>
- Date: Wed, 25 May 2016 14:41:29 +0100
- Subject: Re: [PATCH 2/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> <20160525133241 dot GB6938 at linux dot vnet dot ibm dot com>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Wed, May 25, 2016 at 02:32:41PM +0100, Dominik Vogt wrote:
> On Wed, May 25, 2016 at 02:30:54PM +0100, Dominik Vogt wrote:
> > On Tue, May 03, 2016 at 03:17:53PM +0100, Dominik Vogt wrote:
> > > Version two of the patch including a test case.
> > >
> > > On Mon, May 02, 2016 at 09:10:25AM -0600, Jeff Law wrote:
> > > > On 04/29/2016 04:12 PM, Dominik Vogt wrote:
> > > > >The attached patch removes excess stack space allocation with
> > > > >alloca in some situations. Plese check the commit message in the
> > > > >patch for details.
> > >
> > > > However, I would strongly recommend some tests, even if they are
> > > > target specific. You can always copy pr36728-1 into the s390x
> > > > directory and look at size of the generated stack. Simliarly for
> > > > pr50938 for x86.
> > >
> > > However, x86 uses the "else" branch in round_push, i.e. it uses
> > > "virtual_preferred_stack_boundary_rtx" to calculate the number of
> > > bytes to add for stack alignment. That value is unknown at the
> > > time round_push is called, so the test case fails on such targets,
> > > and I've no idea how to fix this properly.
> >
> > Third version of the patch with the suggested cleanup in the first
> > patch and the functional stuff in the second one. The first patch
> > is based on Jeff's draft with the change suggested by Eric and
> > more cleanup added by me.
>
> This is the updated funtional patch. Re-tested with limited
> effort, i.e. tested and bootstrapped on s390x biarch (but did not
> look for performance regressions compared to version 2 of the
> patch).
(I won't be able to reply to any comments until 20th of June.)
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany