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]

Re: calls.c code permutation patch


> On Wed, May 03, 2000 at 02:55:36PM +0200, Jan Hubicka wrote:
> > 	* calls.c (expand_call): Reorganize somewhat in order
> > 	to avoid unnecesary recalculation inside loop and make
> > 	tail call failure code cleaner.
> 
> This broke Alpha.  I'm not sure why you were insisting on moving
> down the increment of currently_expanding_call, but it was still wrong.
I wanted to keep all the expanding stuff together..
> 
> If it's not correct before optimize_tail_calls, it's possible
> to create circular rtl, which makes for all sorts of fun.
OK. I see.
sorry for another breakage.

Honza
> 
> 
> r~
> 
> 
>         * calls.c (expand_call): Increment currently_expanding_call
>         before calling optimize_tail_recursion.
> 
> Index: calls.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/calls.c,v
> retrieving revision 1.131
> diff -c -p -d -r1.131 calls.c
> *** calls.c	2000/05/09 14:33:41	1.131
> --- calls.c	2000/05/10 02:49:48
> *************** expand_call (exp, target, ignore)
> *** 2305,2313 ****
>        This is most often true of sjlj-exceptions, which we couldn't
>        tail-call to anyway.  */
>   
> !   if (!flag_optimize_sibling_calls
>         || !rtx_equal_function_value_matters
> -       || currently_expanding_call
>         || !stmt_loop_nest_empty ()
>         || any_pending_cleanups (1)
>         || args_size.var)
> --- 2305,2313 ----
>        This is most often true of sjlj-exceptions, which we couldn't
>        tail-call to anyway.  */
>   
> !   if (currently_expanding_call++ != 0
> !       || !flag_optimize_sibling_calls
>         || !rtx_equal_function_value_matters
>         || !stmt_loop_nest_empty ()
>         || any_pending_cleanups (1)
>         || args_size.var)
> *************** expand_call (exp, target, ignore)
> *** 2447,2454 ****
>         pending_stack_adjust = save_pending_stack_adjust;
>         stack_pointer_delta = save_stack_pointer_delta;
>       }
> - 
> -   currently_expanding_call++;
>   
>     if (profile_arc_flag && (flags & ECF_FORK_OR_EXEC))
>       {
> --- 2447,2452 ----

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