[PATCH] Count CONVERT_EXPR like NOP_EXPR for estimating function size

Richard Guenther rguenther@suse.de
Wed Jul 4 16:31:00 GMT 2007


They are used indifferently in the middle-end.  This was on my TODO list
for a long time.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to mainline.

Richard.

2007-07-04  Richard Guenther  <rguenther@suse.de>

	* tree-inline.c (estimate_num_insns_1): Treat CONVERT_EXPR
	the same as NOP_EXPR.

Index: tree-inline.c
===================================================================
*** tree-inline.c	(revision 126323)
--- tree-inline.c	(working copy)
*************** estimate_num_insns_1 (tree *tp, int *wal
*** 1984,1989 ****
--- 1984,1990 ----
      case BIND_EXPR:
      case WITH_CLEANUP_EXPR:
      case NOP_EXPR:
+     case CONVERT_EXPR:
      case VIEW_CONVERT_EXPR:
      case SAVE_EXPR:
      case ADDR_EXPR:
*************** estimate_num_insns_1 (tree *tp, int *wal
*** 2127,2134 ****
      case UNEQ_EXPR:
      case LTGT_EXPR:
  
-     case CONVERT_EXPR:
- 
      case CONJ_EXPR:
  
      case PREDECREMENT_EXPR:
--- 2128,2133 ----



More information about the Gcc-patches mailing list