diff mbox

Initial shrink-wrapping patch

Message ID 4E8C9192.9090500@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Oct. 5, 2011, 5:19 p.m. UTC
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.

Comments

Richard Henderson Oct. 5, 2011, 5:51 p.m. UTC | #1
On 10/05/2011 10:19 AM, Bernd Schmidt wrote:
> 	* function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap
> 	if profiling after the prologue.

Ok.


r~
diff mbox

Patch

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;