------- Comment #10 from wilson at tuliptree dot org  2010-02-04 22:16 -------
Subject: Re:  Optimization flag -O1 -fschedule-insns2
 cause red zone to be used when there is none

On Thu, 2010-02-04 at 16:36 +0000, pinskia at gmail dot com wrote:
> Well powerpc64 it is valid to move across the stack pointer if the  
> stack is less than a specific size so this can cause regressions  
> there. And will also cause a performance regressions on x86_64 also  
> for the same reason.

We could perhaps make it a target hook.  For powerpc, the hook returns
true if this is the sysv ABI, and returns false if this is the AIX ABI.
That might also be useful for ARM, if you need it to be true for thumb
and false for the arm port.

I'm not sure at the moment if this is necessary though.  The testcase in
this bug report is a little different than the one I have.  First thing
I notice is that the powerpc port is not emitting the stack_tie insn
here because there is no frame pointer.  But I think it is always
necessary for the sysv ABI.  If I modify rs6000_emit_stack_reset to
check DEFAULT_ABI == ABI_V4 in the rs6000_emit_stack_tie check, then I
get correct code for this testcase.  I still need to modify the
stack_tie pattern to use (MEM:BLK (scratch)) to get correct code for my
testcase.  These are two fairly simple powerpc backend changes though.

I'll have to look at the arm/thumb port next to see what is going on
there.

Jim


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30282

Reply via email to