This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] -mcount-nofp patch for committing


> +@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]