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: Initial shrink-wrapping patch


Just a suggestion, but...

Bernd Schmidt <bernds@codesourcery.com> writes:
> Index: gcc/cfgcleanup.c
> ===================================================================
> --- gcc/cfgcleanup.c	(revision 178734)
> +++ gcc/cfgcleanup.c	(working copy)
> @@ -1488,6 +1488,16 @@ outgoing_edges_match (int mode, basic_bl
>    edge e1, e2;
>    edge_iterator ei;
>  
> +  /* If we performed shrink-wrapping, edges to the EXIT_BLOCK_PTR can
> +     only be distinguished for JUMP_INSNs.  The two paths may differ in
> +     whether they went through the prologue.  Sibcalls are fine, we know
> +     that we either didn't need or inserted an epilogue before them.  */
> +  if (flag_shrink_wrap
> +      && single_succ_p (bb1) && single_succ (bb1) == EXIT_BLOCK_PTR
> +      && !JUMP_P (BB_END (bb1))
> +      && !(CALL_P (BB_END (bb1)) && SIBLING_CALL_P (BB_END (bb1))))
> +    return false;

...how about adding a bit to crtl to say whether shrink-wrap occured,
and check that instead of flag_shrink_wrap?

(Leaving the full review to Richard.)

Richard


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