RFC: Patch to allow spill slot alignment greater than the stack alignment
Bernd Schmidt
bschmidt@redhat.com
Mon Oct 5 08:41:00 GMT 2015
On 10/02/2015 10:57 PM, Steve Ellcey wrote:
> I have spent some time trying to do dynamic stack alignment on MIPS and had
> considerable trouble. The problems are mainly due to the dwarf based stack
> unwinding and setjmp/longjmp usages where the code does not go through the
> normal function prologue and epilogue code.
[...]
> The main advantage to this approach over dynamically aligning the stack
> is that by not changing the real stack (or frame) pointer there is
> minimal chance of breaking the ABI and there are no changes needed to
> the dwarf unwind code. The main disadvantage is that I am padding each
> individual spill so I am wasting more space than absolutely required.
> It should be possible to address this by putting all the aligned spills
> together and sharing the padding but I would like to leave that for a
> future improvement.
>
> In the mean time I would like to get some comments on this approach and
> see what people think. Does this seem like a reasonable approach to
> allowing for aligned spills beyond what the stack supports?
Personally I'm not a fan. Your description of it makes it sound
immensely wasteful, and I'm really not clear on why stack alignment
wouldn't work for MIPS when it's been shown to work elsewhere. I think
we'd want to see a clear demonstration of unfixable problems with stack
alignment before allowing something like this in.
Vlad would have to comment on the LRA bits, probably.
Bernd
More information about the Gcc-patches
mailing list