RFA: Pass -mno-omit-leaf-frame-pointer to sse-10.c

Jan Hubicka hubicka@ucw.cz
Mon May 7 19:48:00 GMT 2007


> Jan Hubicka wrote:
> >>> This test passes -fno-omit-frame-pointer.  On most systems, that
> >>> implies -mno-omit-leaf-frame-pointer -- but not on Solaris 10.  And,
> >>> it turns out that both are required for the test to pass.
> >> The -fno-omit-frame-pointer is specified because of warning:
> >>
> >>   /* ??? Unwind info is not correct around the CFG unless either a frame
> >>      pointer is present or M_A_O_A is set.  Fixing this requires rewriting
> >>      unwind info generation to be aware of the CFG and propagating states
> >>      around edges.  */
> >>   if ((flag_unwind_tables || flag_asynchronous_unwind_tables
> >>        || flag_exceptions || flag_non_call_exceptions)
> >>       && flag_omit_frame_pointer
> >>       && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
> >>
> >> However since this thing is testing only flag_omit_frame_pointer.  This
> >> probably won't first with -fno-omit-frame-pointer.  Moreover I think it
> > 
> > Huh, I've managed to encode this in my typo system.  What I meant is
> > that the warning does not depend on -mno-omit-leaf-frame-pointer and
> > thus the problem you are seeing is probably independent.  
> 
> Actually, it does depend on that flag  When I run an x86 GNU/Linux
> compiler like this:
> 
> cc1 -quiet -O1 -msse2 -mfpmath=sse -mno-accumulate-outgoing-args
> -fno-omit-frame-pointer -momit-leaf-frame-pointer sse-10.c
> 
> I get:
> 
> /home/mitchell/scratch/solaris-mainline/src/gcc-mainline/gcc/testsuite/gcc.target/i386/sse-10.c:1:
> warning: unwind tables currently require either a frame pointer or
> -maccumulate-outgoing-args for correctness
> 
> So, if for some reason you ran the testsuite with
> -momit-leaf-frame-pointer on x86 GNU/Linux, you'd probably see the same
> failure I'm seeing on Solaris 10 x86.

I see, -fomit-leaf-frame-pointer implies flat_omit_frame_pointer with 
ix86_frame_pointer_required claiming the frame pointer required for all
non-leaf functions.  I don't see reason why the unwind info would be
wrong when it is not for -maccumulate-outgoing-args in leafs, so I would
just add
&& !TARGET_OMIT_LEAF_FRAME_POINTER
to the test guarding warning.

Honza



More information about the Gcc-patches mailing list