This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Patch to allow spill slot alignment greater than the stack alignment
- From: Steve Ellcey <sellcey at imgtec dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Bernd Schmidt <bschmidt at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 6 Oct 2015 11:32:38 -0700
- Subject: Re: RFC: Patch to allow spill slot alignment greater than the stack alignment
- Authentication-results: sourceware.org; auth=none
- References: <1443819469 dot 8687 dot 182 dot camel at ubuntu-sellcey> <561237B9 dot 1080602 at redhat dot com> <1444061411 dot 8687 dot 207 dot camel at ubuntu-sellcey> <CAMe9rOr17KDCXzNoAZN6fgXXJ1MMu-enkDw_ykAPpSQAeiAnWQ at mail dot gmail dot com> <1444063572 dot 8687 dot 219 dot camel at ubuntu-sellcey> <CAMe9rOq5um+cOh2=ibgg10u7WDGSQP80MoDCqHszMa-uz-s3fg at mail dot gmail dot com> <1444145408 dot 8687 dot 238 dot camel at ubuntu-sellcey> <5613EB22 dot 4020505 at redhat dot com> <1444154522 dot 8687 dot 248 dot camel at ubuntu-sellcey> <CAMe9rOqMPaAJm_DQ3VOsSnFUe3qek6FaTYReTpV2nwgDdLOCUA at mail dot gmail dot com>
- Reply-to: <sellcey at imgtec dot com>
On Tue, 2015-10-06 at 11:10 -0700, H.J. Lu wrote:
> Does it pass all tests under g++.dg/torture/stackalign? You need
> to implement -mstackrealign and -mpreferred-stack-boundary=
> as well as update check_effective_target_automatic_stack_alignment
> to run all stack alignment tests.
No, those tests were not run. I have not implemented the -mstackrealign
or -mpreferred-stack-boundary options. I do not think those are the
options I want for stack realignment on MIPS. The only reason
for implementing stack realignment on MIPS is to align MSA (vector)
register spills. Yes, stack realignment can also be used with aligned
local variables but those could also be handled with the existing alloca
method without implementing stack realignment.
So I want an option (turned on by default when using -mmsa) that only
aligns a function if that function contains MSA register usage. I don't
want an option to align every function because that would slow things
down for no reason. I should and will try these test cases with my
option. Right now my testing forces all functions to be aligned even if
they don't use MSA because that gives me maximum testing, but the final
code will only align functions that use MSA.
Steve Ellcey
sellcey@imgtec.com