On 10/05/11 00:29, Richard Henderson wrote:
> As a followup, I think this option needs to be disabled for profiling
> and profile_after_prologue. Should be a mere matter of frobbing the
> options at startup.
The other code seems to test crtl->profile rather than an option flag,
so how's this? Bootstrapped along with the x86_64 fix.
Bernd
* function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap
if profiling after the prologue.
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 179553)
+++ gcc/function.c (working copy)
@@ -5571,6 +5571,7 @@ thread_prologue_and_epilogue_insns (void
}
if (flag_shrink_wrap && HAVE_simple_return
+ && (targetm.profile_before_prologue () || !crtl->profile)
&& nonempty_prologue && !crtl->calls_eh_return)
{
HARD_REG_SET prologue_clobbered, prologue_used, live_on_edge;