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]

[RFC/RFA?] New estimation of function body size for inlining


Hi,
this patch implements new function to estimate function size.
Instead of counting number of statements that can be fooled by very
complex statements in one direction and very many lexical blocks and
similar noops in the other direction I now do simple recursive walk
without duplicates and attempt to count everything that looks like
operation with few special cases dealing with common NOOPs and common
expensive expressions.

I tested this herustics with positive results with new inlining
heuristics that appears to be more dependnet on the quality of
estimates.  I also bootstrapped and benchmarked the patch on PR 8361 and
got similar code sizes/perfomrance and I benchmarked some improvements
in Gerald's benchmarks.  SPEC2000 is in progress.

The function is not meant to be very robust, but is should work better
than what we have right now.  I would like to improve it later by
noticing some extra special cases as turns out to be needed, but I don't
have time to do that right now.

Does this look sensible for mainline?

Honza

Sun Jun 29 23:38:03 CEST 2003  Jan Hubicka  <jh@suse.cz>
	* c-common.h  (DECL_NUM_STMTS): Rename to...
	(DECL_ESTIMATED_INSNS): ... this one.
	* c-decl.c (duplicate_decls): Use DECL_ESTIMATE_INSNS.
	* c-semantics (add_stmt): Do not increase NUM_STMTS.
	* params.def (max-inline-insns-single): Set to 100.
	(max-inline-insns-auto): set to 100.
	(max-inline-insns): Set to 300.
	(min-inline-insns): set to 10.
	* tree-inline.c (inline_data): Replace inlined_stmts by inlined_insns.
	(INSNS_PER_STMT): Kill.
	(estimate_num_insns_1): New function.
	(estimate_num_insns): New global function.
	(inlinable_function_p): Compute number of insns if needed.
	(expand_call_inline): Use DECL_ESTIMATED_INSNS
	(optimize_inline_calls): Compute number of insns if needed.
	* tree-inline.h (estimate_num_insns): Declare.

	* cp/decl.c (duplicate_decls, start_function): Use DECL_ESTIMATE_INSNS.
	* cp/optimize.c (maybe_clone_body): Likewise.

	* java/java-tree.h (DECL_NUM_STMTS): Rename to...
	(DECL_ESTIMATED_INSNS): ... this one.
	* parse.y (add_stmt_to_block): Do not compute NUM_STMTS.
Index: c-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.184
diff -c -3 -p -r1.184 c-common.h
*** c-common.h	23 Jun 2003 15:27:34 -0000	1.184
--- c-common.h	29 Jun 2003 22:07:33 -0000
*************** struct c_lang_decl GTY(()) {
*** 348,354 ****
       the approximate number of statements in this function.  There is
       no need for this number to be exact; it is only used in various
       heuristics regarding optimization.  */
! #define DECL_NUM_STMTS(NODE) \
    (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
  
  /* The variant of the C language being processed.  Each C language
--- 348,354 ----
       the approximate number of statements in this function.  There is
       no need for this number to be exact; it is only used in various
       heuristics regarding optimization.  */
! #define DECL_ESTIMATED_INSNS(NODE) \
    (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
  
  /* The variant of the C language being processed.  Each C language
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.399
diff -c -3 -p -r1.399 c-decl.c
*** c-decl.c	29 Jun 2003 11:28:00 -0000	1.399
--- c-decl.c	29 Jun 2003 22:07:34 -0000
*************** duplicate_decls (tree newdecl, tree oldd
*** 1474,1480 ****
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
  	  DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
  	  DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
! 	  DECL_NUM_STMTS (newdecl) = DECL_NUM_STMTS (olddecl);
  	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
  
  	  /* Set DECL_INLINE on the declaration if we've got a body
--- 1474,1480 ----
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
  	  DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
  	  DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
! 	  DECL_ESTIMATED_INSNS (newdecl) = DECL_ESTIMATED_INSNS (olddecl);
  	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
  
  	  /* Set DECL_INLINE on the declaration if we've got a body
Index: c-semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-semantics.c,v
retrieving revision 1.64
diff -c -3 -p -r1.64 c-semantics.c
*** c-semantics.c	27 Jun 2003 09:49:30 -0000	1.64
--- c-semantics.c	29 Jun 2003 22:07:35 -0000
*************** add_stmt (tree t)
*** 98,107 ****
       statements are full-expressions.  We record that fact here.  */
    STMT_IS_FULL_EXPR_P (last_tree) = stmts_are_full_exprs_p ();
  
-   /* Keep track of the number of statements in this function.  */
-   if (current_function_decl)
-     ++DECL_NUM_STMTS (current_function_decl);
- 
    return t;
  }
  
--- 98,103 ----
Index: params.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/params.def,v
retrieving revision 1.25
diff -c -3 -p -r1.25 params.def
*** params.def	4 Jun 2003 07:51:41 -0000	1.25
--- params.def	29 Jun 2003 22:07:35 -0000
*************** Software Foundation, 59 Temple Place - S
*** 39,45 ****
     of a function counted in internal gcc instructions (not in
     real machine instructions) that is eligible for inlining
     by the tree inliner.
!    The default value is 300.
     Only functions marked inline (or methods defined in the class
     definition for C++) are affected by this, unless you set the
     -finline-functions (included in -O3) compiler option.
--- 39,45 ----
     of a function counted in internal gcc instructions (not in
     real machine instructions) that is eligible for inlining
     by the tree inliner.
!    The default value is 100.
     Only functions marked inline (or methods defined in the class
     definition for C++) are affected by this, unless you set the
     -finline-functions (included in -O3) compiler option.
*************** Software Foundation, 59 Temple Place - S
*** 51,57 ****
  DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
  	  "max-inline-insns-single",
  	  "The maximum number of instructions in a single function eligible for inlining",
! 	  300)
  
  /* The single function inlining limit for functions that are
     inlined by virtue of -finline-functions (-O3).
--- 51,57 ----
  DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
  	  "max-inline-insns-single",
  	  "The maximum number of instructions in a single function eligible for inlining",
! 	  100)
  
  /* The single function inlining limit for functions that are
     inlined by virtue of -finline-functions (-O3).
*************** DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
*** 59,69 ****
     that is applied to functions marked inlined (or defined in the
     class declaration in C++) given by the "max-inline-insns-single"
     parameter.
!    The default value is 300.  */
  DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
  	  "max-inline-insns-auto",
  	  "The maximum number of instructions when automatically inlining",
! 	  300)
  
  /* The repeated inlining limit.  After this number of instructions 
     (in the internal gcc representation, not real machine instructions)
--- 59,69 ----
     that is applied to functions marked inlined (or defined in the
     class declaration in C++) given by the "max-inline-insns-single"
     parameter.
!    The default value is 100.  */
  DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
  	  "max-inline-insns-auto",
  	  "The maximum number of instructions when automatically inlining",
! 	  100)
  
  /* The repeated inlining limit.  After this number of instructions 
     (in the internal gcc representation, not real machine instructions)
*************** DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
*** 82,88 ****
  DEFPARAM (PARAM_MAX_INLINE_INSNS,
  	  "max-inline-insns",
  	  "The maximum number of instructions by repeated inlining before gcc starts to throttle inlining",
! 	  600)
  
  /* After the repeated inline limit has been exceeded (see
     "max-inline-insns" parameter), a linear function is used to
--- 82,88 ----
  DEFPARAM (PARAM_MAX_INLINE_INSNS,
  	  "max-inline-insns",
  	  "The maximum number of instructions by repeated inlining before gcc starts to throttle inlining",
! 	  300)
  
  /* After the repeated inline limit has been exceeded (see
     "max-inline-insns" parameter), a linear function is used to
*************** DEFPARAM (PARAM_MAX_INLINE_SLOPE,
*** 108,114 ****
  DEFPARAM (PARAM_MIN_INLINE_INSNS,
  	  "min-inline-insns",
  	  "The number of instructions in a single functions still eligible to inlining after a lot recursive inlining",
! 	  130)
  
  /* For languages that (still) use the RTL inliner, we can specify
     limits for the RTL inliner separately.
--- 108,114 ----
  DEFPARAM (PARAM_MIN_INLINE_INSNS,
  	  "min-inline-insns",
  	  "The number of instructions in a single functions still eligible to inlining after a lot recursive inlining",
! 	  10)
  
  /* For languages that (still) use the RTL inliner, we can specify
     limits for the RTL inliner separately.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.63
diff -c -3 -p -r1.63 tree-inline.c
*** tree-inline.c	20 Jun 2003 19:55:23 -0000	1.63
--- tree-inline.c	29 Jun 2003 22:07:35 -0000
*************** typedef struct inline_data
*** 93,101 ****
    int in_target_cleanup_p;
    /* A list of the functions current function has inlined.  */
    varray_type inlined_fns;
!   /* The approximate number of statements we have inlined in the
       current call stack.  */
!   int inlined_stmts;
    /* We use the same mechanism to build clones that we do to perform
       inlining.  However, there are a few places where we need to
       distinguish between those two situations.  This flag is true if
--- 93,101 ----
    int in_target_cleanup_p;
    /* A list of the functions current function has inlined.  */
    varray_type inlined_fns;
!   /* The approximate number of instructions we have inlined in the
       current call stack.  */
!   int inlined_insns;
    /* We use the same mechanism to build clones that we do to perform
       inlining.  However, there are a few places where we need to
       distinguish between those two situations.  This flag is true if
*************** static tree find_alloca_call_1 PARAMS ((
*** 130,140 ****
  static tree find_alloca_call PARAMS ((tree));
  static tree find_builtin_longjmp_call_1 PARAMS ((tree *, int *, void *));
  static tree find_builtin_longjmp_call PARAMS ((tree));
! 
! /* The approximate number of instructions per statement.  This number
!    need not be particularly accurate; it is used only to make
!    decisions about when a function is too big to inline.  */
! #define INSNS_PER_STMT (10)
  
  /* Remap DECL during the copying of the BLOCK tree for the function.  */
  
--- 130,136 ----
  static tree find_alloca_call PARAMS ((tree));
  static tree find_builtin_longjmp_call_1 PARAMS ((tree *, int *, void *));
  static tree find_builtin_longjmp_call PARAMS ((tree));
! static tree estimate_num_insns_1 PARAMS ((tree *, int *, void *));
  
  /* Remap DECL during the copying of the BLOCK tree for the function.  */
  
*************** find_builtin_longjmp_call (exp)
*** 960,965 ****
--- 956,1058 ----
    return ret;
  }
  
+ /* Used by estimate_num_insns.  Estimate number of instructions seen
+    by given statement.  */
+ static tree
+ estimate_num_insns_1 (tp, walk_subtrees, data)
+      tree *tp;
+      int *walk_subtrees;
+      void *data;
+ {
+   int *count = data;
+   tree x = *tp;
+ 
+   if (TYPE_P (x) || DECL_P (x))
+     {
+       *walk_subtrees = 0;
+       return NULL;
+     }
+   if (TREE_CODE_CLASS (TREE_CODE (x)) == 'c'
+       || TREE_CODE_CLASS (TREE_CODE (x)) == 'r')
+     return NULL;
+   switch (TREE_CODE (x))
+     {
+     case CONSTRUCTOR:
+     case MODIFY_EXPR:
+     case INIT_EXPR:
+     case TARGET_EXPR:
+     case BIND_EXPR:
+     case TRUNC_DIV_EXPR:
+     case CEIL_DIV_EXPR:
+     case FLOOR_DIV_EXPR:
+     case ROUND_DIV_EXPR:
+     case TRUNC_MOD_EXPR:
+     case CEIL_MOD_EXPR:
+     case FLOOR_MOD_EXPR:
+     case ROUND_MOD_EXPR:
+     case RDIV_EXPR:
+     case CALL_EXPR:
+     case METHOD_CALL_EXPR:
+       *count += 10;
+       break;
+     case BLOCK:
+     case TREE_LIST:
+     case TREE_VEC:
+     case IDENTIFIER_NODE:
+     case PLACEHOLDER_EXPR:
+     case WITH_CLEANUP_EXPR:
+     case CLEANUP_POINT_EXPR:
+     case NOP_EXPR:
+     case VIEW_CONVERT_EXPR:
+     case SAVE_EXPR:
+     case UNSAVE_EXPR:
+     case COMPLEX_EXPR:
+     case REALPART_EXPR:
+     case IMAGPART_EXPR:
+     case TRY_CATCH_EXPR:
+     case TRY_FINALLY_EXPR:
+     case LABEL_EXPR:
+     case EXIT_EXPR:
+     case LABELED_BLOCK_EXPR:
+     case EXIT_BLOCK_EXPR:
+     case EXPR_WITH_FILE_LOCATION:
+ 
+     case EXPR_STMT:
+     case COMPOUND_STMT:
+     case RETURN_STMT:
+     case LABEL_STMT:
+     case SCOPE_STMT:
+     case FILE_STMT:
+     case CASE_LABEL:
+     case STMT_EXPR:
+     case CLEANUP_STMT:
+ 
+     case SIZEOF_EXPR:
+     case ARROW_EXPR:
+     case ALIGNOF_EXPR:
+       break;
+     case DECL_STMT:
+       /* Do not account static initializers.  */
+       if (TREE_STATIC (TREE_OPERAND (x, 0)))
+ 	*walk_subtrees = 0;
+       break;
+     default:
+       (*count)++;
+     }
+   return NULL;
+ }
+ 
+ /*  Estimate number of instructions that will be created by expanding the body.  */
+ int
+ estimate_num_insns (decl)
+      tree decl;
+ {
+   int num = 0;
+   walk_tree_without_duplicates (&DECL_SAVED_TREE (decl), estimate_num_insns_1, &num);
+   return num;
+ }
+ 
+ 
  /* Returns nonzero if FN is a function that can be inlined into the
     inlining context ID_.  If ID_ is NULL, check whether the function
     can be inlined at all.  */
*************** inlinable_function_p (fn, id, nolimit)
*** 971,977 ****
       int nolimit;
  {
    int inlinable;
!   int currfn_insns;
    int max_inline_insns_single = MAX_INLINE_INSNS_SINGLE;
  
    /* If we've already decided this function shouldn't be inlined,
--- 1064,1070 ----
       int nolimit;
  {
    int inlinable;
!   int currfn_insns = 0;
    int max_inline_insns_single = MAX_INLINE_INSNS_SINGLE;
  
    /* If we've already decided this function shouldn't be inlined,
*************** inlinable_function_p (fn, id, nolimit)
*** 991,997 ****
      max_inline_insns_single = MAX_INLINE_INSNS_AUTO;
  	
    /* The number of instructions (estimated) of current function.  */
!   currfn_insns = DECL_NUM_STMTS (fn) * INSNS_PER_STMT;
  
    /* If we're not inlining things, then nothing is inlinable.  */
    if (! flag_inline_trees)
--- 1084,1092 ----
      max_inline_insns_single = MAX_INLINE_INSNS_AUTO;
  	
    /* The number of instructions (estimated) of current function.  */
!   if (!nolimit && !DECL_ESTIMATED_INSNS (fn))
!     DECL_ESTIMATED_INSNS (fn) = estimate_num_insns (fn);
!   currfn_insns = DECL_ESTIMATED_INSNS (fn);
  
    /* If we're not inlining things, then nothing is inlinable.  */
    if (! flag_inline_trees)
*************** inlinable_function_p (fn, id, nolimit)
*** 1040,1047 ****
    if (! (*lang_hooks.tree_inlining.disregard_inline_limits) (fn)
        && inlinable && !nolimit)
      {
!       int sum_insns = (id ? id->inlined_stmts : 0) * INSNS_PER_STMT
! 		     + currfn_insns;
        /* In the extreme case that we have exceeded the recursive inlining
           limit by a huge factor (128), we just say no. Should not happen
           in real life.  */
--- 1135,1141 ----
    if (! (*lang_hooks.tree_inlining.disregard_inline_limits) (fn)
        && inlinable && !nolimit)
      {
!       int sum_insns = (id ? id->inlined_insns : 0) + currfn_insns;
        /* In the extreme case that we have exceeded the recursive inlining
           limit by a huge factor (128), we just say no. Should not happen
           in real life.  */
*************** expand_call_inline (tp, walk_subtrees, d
*** 1429,1437 ****
    TREE_USED (*tp) = 1;
  
    /* Our function now has more statements than it did before.  */
!   DECL_NUM_STMTS (VARRAY_TREE (id->fns, 0)) += DECL_NUM_STMTS (fn);
    /* For accounting, subtract one for the saved call/ret.  */
!   id->inlined_stmts += DECL_NUM_STMTS (fn) - 1;
  
    /* Update callgraph if needed.  */
    if (id->decl && flag_unit_at_a_time)
--- 1523,1531 ----
    TREE_USED (*tp) = 1;
  
    /* Our function now has more statements than it did before.  */
!   DECL_ESTIMATED_INSNS (VARRAY_TREE (id->fns, 0)) += DECL_ESTIMATED_INSNS (fn);
    /* For accounting, subtract one for the saved call/ret.  */
!   id->inlined_insns += DECL_ESTIMATED_INSNS (fn) - 1;
  
    /* Update callgraph if needed.  */
    if (id->decl && flag_unit_at_a_time)
*************** expand_call_inline (tp, walk_subtrees, d
*** 1447,1453 ****
    /* If we've returned to the top level, clear out the record of how
       much inlining has been done.  */
    if (VARRAY_ACTIVE_SIZE (id->fns) == id->first_inlined_fn)
!     id->inlined_stmts = 0;
  
    /* Don't walk into subtrees.  We've already handled them above.  */
    *walk_subtrees = 0;
--- 1541,1547 ----
    /* If we've returned to the top level, clear out the record of how
       much inlining has been done.  */
    if (VARRAY_ACTIVE_SIZE (id->fns) == id->first_inlined_fn)
!     id->inlined_insns = 0;
  
    /* Don't walk into subtrees.  We've already handled them above.  */
    *walk_subtrees = 0;
*************** optimize_inline_calls (fn)
*** 1490,1495 ****
--- 1584,1591 ----
    /* Don't allow recursion into FN.  */
    VARRAY_TREE_INIT (id.fns, 32, "fns");
    VARRAY_PUSH_TREE (id.fns, fn);
+   if (!DECL_ESTIMATED_INSNS (fn))
+     DECL_ESTIMATED_INSNS (fn) = estimate_num_insns (fn);
    /* Or any functions that aren't finished yet.  */
    prev_fn = NULL_TREE;
    if (current_function_decl)
Index: tree-inline.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.h,v
retrieving revision 1.6
diff -c -3 -p -r1.6 tree-inline.h
*** tree-inline.h	13 Mar 2003 03:51:01 -0000	1.6
--- tree-inline.h	29 Jun 2003 22:07:35 -0000
*************** tree walk_tree_without_duplicates PARAMS
*** 31,36 ****
--- 31,37 ----
  tree copy_tree_r PARAMS ((tree*, int*, void*));
  void clone_body PARAMS ((tree, tree, void*));
  void remap_save_expr PARAMS ((tree*, void*, tree, int*));
+ int estimate_num_insns PARAMS ((tree));
  
  /* 0 if we should not perform inlining.
     1 if we should expand functions calls inline at the tree level.
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1074
diff -c -3 -p -r1.1074 decl.c
*** cp/decl.c	28 Jun 2003 00:30:29 -0000	1.1074
--- cp/decl.c	29 Jun 2003 22:07:37 -0000
*************** duplicate_decls (tree newdecl, tree oldd
*** 3531,3537 ****
  	      SET_DECL_RTL (newdecl, DECL_RTL (olddecl));
  	    }
  	  else
! 	    DECL_NUM_STMTS (newdecl) = DECL_NUM_STMTS (olddecl);
  
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
  	  /* Don't clear out the arguments if we're redefining a function.  */
--- 3531,3537 ----
  	      SET_DECL_RTL (newdecl, DECL_RTL (olddecl));
  	    }
  	  else
! 	    DECL_ESTIMATED_INSNS (newdecl) = DECL_ESTIMATED_INSNS (olddecl);
  
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
  	  /* Don't clear out the arguments if we're redefining a function.  */
*************** start_function (tree declspecs, tree dec
*** 13524,13530 ****
    begin_stmt_tree (&DECL_SAVED_TREE (decl1));
  
    /* Don't double-count statements in templates.  */
!   DECL_NUM_STMTS (decl1) = 0;
  
    /* Let the user know we're compiling this function.  */
    announce_function (decl1);
--- 13524,13530 ----
    begin_stmt_tree (&DECL_SAVED_TREE (decl1));
  
    /* Don't double-count statements in templates.  */
!   DECL_ESTIMATED_INSNS (decl1) = 0;
  
    /* Let the user know we're compiling this function.  */
    announce_function (decl1);
Index: cp/optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/optimize.c,v
retrieving revision 1.91
diff -c -3 -p -r1.91 optimize.c
*** cp/optimize.c	18 Jun 2003 05:58:53 -0000	1.91
--- cp/optimize.c	29 Jun 2003 22:07:37 -0000
*************** maybe_clone_body (tree fn)
*** 254,260 ****
  
        /* There are as many statements in the clone as in the
  	 original.  */
!       DECL_NUM_STMTS (clone) = DECL_NUM_STMTS (fn);
  
        /* Clean up.  */
        splay_tree_delete (decl_map);
--- 254,260 ----
  
        /* There are as many statements in the clone as in the
  	 original.  */
!       DECL_ESTIMATED_INSNS (clone) = DECL_ESTIMATED_INSNS (fn);
  
        /* Clean up.  */
        splay_tree_delete (decl_map);
Index: java/java-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.176
diff -c -3 -p -r1.176 java-tree.h
*** java/java-tree.h	9 Jun 2003 19:54:26 -0000	1.176
--- java/java-tree.h	29 Jun 2003 22:07:38 -0000
*************** union lang_tree_node 
*** 922,931 ****
  #define DECL_FIELD_FINAL_WFL(NODE) \
    (DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
  /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
!      the approximate number of statements in this function.  There is
       no need for this number to be exact; it is only used in various
       heuristics regarding optimization.  */
! #define DECL_NUM_STMTS(NODE) \
    (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
  /* True if NODE is a local variable final. */
  #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
--- 922,931 ----
  #define DECL_FIELD_FINAL_WFL(NODE) \
    (DECL_LANG_SPECIFIC(NODE)->u.v.wfl)
  /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this is
!      the approximate number of instructions in this function.  There is
       no need for this number to be exact; it is only used in various
       heuristics regarding optimization.  */
! #define DECL_ESTIMATED_INSNS(NODE) \
    (FUNCTION_DECL_CHECK (NODE)->decl.u1.i)
  /* True if NODE is a local variable final. */
  #define LOCAL_FINAL_P(NODE) (DECL_LANG_SPECIFIC (NODE) && DECL_FINAL (NODE))
Index: java/parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.436
diff -c -3 -p -r1.436 parse.y
*** java/parse.y	20 Jun 2003 09:08:23 -0000	1.436
--- java/parse.y	29 Jun 2003 22:07:39 -0000
*************** add_stmt_to_block (tree b, tree type, tr
*** 7429,7438 ****
  static tree
  add_stmt_to_compound (tree existing, tree type, tree stmt)
  {
-   /* Keep track of this for inlining.  */
-   if (current_function_decl)
-     ++DECL_NUM_STMTS (current_function_decl);
- 
    if (existing)
      return build (COMPOUND_EXPR, type, existing, stmt);
    else
--- 7429,7434 ----


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