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: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Andi Kleen <andi at firstfloor dot org>
- Date: Sat, 03 Jan 2009 11:18:13 +0100
- Subject: Re: [PATCH] -mcount-nofp patch for committing
- References: <20090103022834.GA23863@basil.nowhere.org>
> +@item -mcount-nofp
> +Don't force the frame counter with @option{-pg} function profiling.
Typo (-mmcount-nofp).
> + 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?
> - 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
&& !targetm.profile_before_prologue
or
&& !targetm.profile_before_prologue && !ix86_mcount_nofp
(The latter, I suppose, for __attribute__ ((__optimize__)) support?)
Paolo