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 i386]: Add for win32 targets pre-prologue profiling feature


Hello Andy,

2010/7/14 Andi Kleen <andi@firstfloor.org>:
> Kai Tietz <ktietz70@googlemail.com> writes:
>>
>> This patch implements it by new hook TARGET_PROFILE_BEFORE_PROLOGUE.
>> This feature is for now just active for win32 i386 targets and is
>> controlled by internal target macro PROFILE_SUPPORT_BEFORE_PROLOGUE.
>
> IMHO the infrastructure in my old patch for this for Linux was a little
> cleaner. Unfortunately that patch is still not applied.
>
> http://thread.gmane.org/gmane.comp.gcc.patches/197870
>
> But if you're going to resubmit this it would be good to merge the two
> at least.
>
> -Andi
>
> --
> ak@linux.intel.com -- Speaking for myself only.
>

to move the -mprologue-top (the name is a bit fanciless) option into
i386.opt was my initial idea. The bad side of it, is that then that
all i386 targets would have this option and for all proper MCOUNT_NAME
entries have to made up, but those targets do not support before
prologue profile call until now. I spoke here with rth and he pointed
it out, that this is possibly something to be avoided.
To your implementation, I see here one big disadvange in comparison to
mine. As for x64 with SEH unwind information (I am working on the
patch and are preparing things here), it needs a different
frame-layout for frame-pointer prologue/epilogue, which enforces the
use of before prologue profiling, a target-function hook instead of a
target-variable is necessary, as otherwise the default setting for
specific modes gets problematic.
Eg for the x64 frame-layout the option needs to be implicit enabled.

But of course I'll take a look into your patch and see, if I am able
to merge things into an new version of it after first review of it is
done.

Cheers,
Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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