This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] -mcount-nofp patch for committing
- From: Andi Kleen <andi at firstfloor dot org>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andi Kleen <andi at firstfloor dot org>
- Date: Sat, 3 Jan 2009 14:23:52 +0100
- Subject: Re: [PATCH] -mcount-nofp patch for committing
- References: <20090103022834.GA23863@basil.nowhere.org> <495F3B65.7090905@gnu.org>
On Sat, Jan 03, 2009 at 11:18:13AM +0100, Paolo Bonzini wrote:
>
> > +@item -mcount-nofp
> > +Don't force the frame counter with @option{-pg} function profiling.
>
> Typo (-mmcount-nofp).
Thanks.
>
> > + if (flag_omit_frame_pointer && profile_flag && ix86_mcount_nofp)
> > + targetm.profile_before_prologue = true;
>
> Do you still need an error if -pg -fomit-frame-pointer is given without
> -mmcount-nofp?
I did it this way because you need a new glibc version, older versions
don't have the nofp hook. So if I didn't give the error and people
specified this accidentially they would get an obscure linker error
later. The idea was that only the new option requires the new glibc
version.
> > - if (crtl->profile)
> > + if (crtl->profile && targetm.profile_before_prologue && !ix86_mcount_nofp)
>
> This is wrong, you can never have "targetm.profile_before_prologue &&
> !ix86_mcount_nofp" on e.g. Linux; you would remove the frame from
> profiled functions even without -mmcount-nofp. Did you mean any of
The frame is still there for -fno-omit-frame-pointer -pg builds in
my testing.
-Andi
--
ak@linux.intel.com