This is the mail archive of the
mailing list for the GCC project.
Re: [patch i386]: Add for win32 targets pre-prologue profiling feature
2010/7/14 Andi Kleen <email@example.com>:
> Kai Tietz <firstname.lastname@example.org> 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.
> But if you're going to resubmit this it would be good to merge the two
> at least.
> email@example.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
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination