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]

[PATCH] Handle BUILT_IN_EH_* in estimate_num_insns


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 
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;
  	    }


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