On Mon, 2015-04-13 at 23:18 -0600, Jeff Law wrote: > But I don't see how using alloca ensures that you're going to have an > aligned spill slot. It can get you an aligned stack pointer, but that > doesn't ensure alignment of any particular spill slot IIRC.
It doesn't. I found a big hole in my idea because as soon as you do an alloca then frame_pointer_needed is set to true and spills are done relative to the frame pointer, not the stack pointer. Thus having an aligned stack pointer at that point doesn't help at all with the alignment of spills. > > My second question is what do people think about this as a way to > > dymanically > > align the stack? It seems a lot simpler and more target independent than > > what x86 is doing. > My biggest worry is the large disconnect between where you're trying to > solve the problem (gimple) and where the problematic bits are > (LRA/reload). That seems like to be fragile in the long run. > > jeff Yes, I am trying to look at how the x86 does dynamic stack alignment but it is difficult to untangle the generic concepts from the parts tied specifically to the x86 calling convention. No other platform appears to do dynamic stack alignment. Steve Ellcey sell...@imgtec.com