[PATCH] Handle BUILT_IN_EH_* in estimate_num_insns

Jan Hubicka hubicka@ucw.cz
Tue Jan 19 16:56:00 GMT 2010


> 
> Currently they are accounted by the move costs of their argument
> and result types plus the fixed call-cost.  Certainly a bit too much
> as they should expand to register operations.  Thus, simply account
> them as such - and register operations are free according to
> estimate_num_insns.
> 
> Any better suggestions?  Both BUILT_IN_EH_FILTER and 

No,
this seems perfectly sane to me!  Does it affect tramp3d scores?
Thanks,
Honza
> BUILT_IN_EH_COPY_VALUES are quite common in tramp3d IL.
> 
> Thanks,
> Richard.
> 
> 2010-01-19  Richard Guenther  <rguenther@suse.de>
> 
> 	* tree-inline.c (estimate_num_insns): Handle EH builtins.
> 
> Index: gcc/tree-inline.c
> ===================================================================
> *** gcc/tree-inline.c	(revision 156035)
> --- gcc/tree-inline.c	(working copy)
> *************** estimate_num_insns (gimple stmt, eni_wei
> *** 3310,3315 ****
> --- 3310,3321 ----
>   	      cost = weights->target_builtin_call_cost;
>   	      break;
>   
> + 	    /* Exception state returns or moves registers around.  */
> + 	    case BUILT_IN_EH_FILTER:
> + 	    case BUILT_IN_EH_POINTER:
> + 	    case BUILT_IN_EH_COPY_VALUES:
> + 	      return 0;
> + 
>   	    default:
>   	      break;
>   	    }



More information about the Gcc-patches mailing list