tree-inline.c (struct inline_data): Remove inlined_fns.
authorDaniel Berlin <dberlin@dberlin.org>
Thu, 23 Dec 2004 02:50:24 +0000 (02:50 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Thu, 23 Dec 2004 02:50:24 +0000 (02:50 +0000)
2004-12-22  Daniel Berlin  <dberlin@dberlin.org>

* tree-inline.c (struct inline_data): Remove inlined_fns.
(expand_call_inline): Remove dead code setting
inlined_fns.
(optimize_inline_calls): Remove dead code setting DECL_INLINED_FNS.
* tree.h (struct tree_decl): Remove inlined_fns.

From-SVN: r92529

gcc/ChangeLog
gcc/tree-inline.c
gcc/tree.h

index 76fd383e3255e1b04ff87c84f80e72a08031b236..00cb8e9a643ccbfc78bb15c577eee02015f6228e 100644 (file)
@@ -1,3 +1,11 @@
+2004-12-22  Daniel Berlin  <dberlin@dberlin.org>
+       
+       * tree-inline.c (struct inline_data): Remove inlined_fns.
+       (expand_call_inline): Remove dead code setting
+       inlined_fns.
+       (optimize_inline_calls): Remove dead code setting DECL_INLINED_FNS.
+       * tree.h (struct tree_decl): Remove inlined_fns.
+
 2004-12-22  Roger Sayle  <roger@eyesopen.com>
 
        * tree-browser.c: Remove obsolete #ifdef HOST_EBCDIC code.
index 53a16133a6af9d3a2714722123af3fae0f5f555e..3ba728b7a9120e03f3ca2fd1ab65b179b879948e 100644 (file)
@@ -94,8 +94,6 @@ typedef struct inline_data
   /* Nonzero if we are currently within the cleanup for a
      TARGET_EXPR.  */
   int in_target_cleanup_p;
-  /* A list of the functions current function has inlined.  */
-  varray_type inlined_fns;
   /* 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
@@ -1567,19 +1565,6 @@ expand_call_inline (tree *tp, int *walk_subtrees, void *data)
      recursing into it.  */
   VARRAY_PUSH_TREE (id->fns, fn);
 
-  /* Record the function we are about to inline if optimize_function
-     has not been called on it yet and we don't have it in the list.  */
-  if (! DECL_INLINED_FNS (fn))
-    {
-      int i;
-
-      for (i = VARRAY_ACTIVE_SIZE (id->inlined_fns) - 1; i >= 0; i--)
-       if (VARRAY_TREE (id->inlined_fns, i) == fn)
-         break;
-      if (i < 0)
-       VARRAY_PUSH_TREE (id->inlined_fns, fn);
-    }
-
   /* Return statements in the function body will be replaced by jumps
      to the RET_LABEL.  */
   id->ret_label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
@@ -1768,7 +1753,6 @@ optimize_inline_calls (tree fn)
 {
   inline_data id;
   tree prev_fn;
-  tree ifn;
 
   /* There is no point in performing inlining if errors have already
      occurred -- and we might crash if we try to inline invalid
@@ -1793,9 +1777,6 @@ optimize_inline_calls (tree fn)
 
   prev_fn = lang_hooks.tree_inlining.add_pending_fn_decls (&id.fns, prev_fn);
 
-  /* Create the list of functions this call will inline.  */
-  VARRAY_TREE_INIT (id.inlined_fns, 32, "inlined_fns");
-
   /* Keep track of the low-water mark, i.e., the point where the first
      real inlining is represented in ID.FNS.  */
   id.first_inlined_fn = VARRAY_ACTIVE_SIZE (id.fns);
@@ -1807,11 +1788,6 @@ optimize_inline_calls (tree fn)
 
   /* Clean up.  */
   htab_delete (id.tree_pruner);
-  ifn = make_tree_vec (VARRAY_ACTIVE_SIZE (id.inlined_fns));
-  if (VARRAY_ACTIVE_SIZE (id.inlined_fns))
-    memcpy (&TREE_VEC_ELT (ifn, 0), &VARRAY_TREE (id.inlined_fns, 0),
-           VARRAY_ACTIVE_SIZE (id.inlined_fns) * sizeof (tree));
-  DECL_INLINED_FNS (fn) = ifn;
 
 #ifdef ENABLE_CHECKING
     {
index 273691daeffa45f9417a0145af799f14f19f4c35..644dff9e753b9be218dea587a8fd33e43db0e806 100644 (file)
@@ -2148,9 +2148,6 @@ struct tree_binfo GTY (())
 #define DECL_VALUE_EXPR(NODE) \
   (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl.saved_tree)
 
-/* List of FUNCTION_DECLs inlined into this function's body.  */
-#define DECL_INLINED_FNS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inlined_fns)
-
 /* Nonzero in a FUNCTION_DECL means this function should be treated
    as if it were a malloc, meaning it returns a pointer that is
    not an alias.  */
@@ -2400,11 +2397,6 @@ struct tree_decl GTY(())
   /* In a FUNCTION_DECL, this is DECL_SAVED_TREE.
      In a VAR_DECL or PARM_DECL, this is DECL_VALUE_EXPR.  */
   tree saved_tree;
-
-  /* In a FUNCTION_DECL, these are function data which is to be kept
-     as long as FUNCTION_DECL is kept.  */
-  tree inlined_fns;
-
   tree vindex;
   HOST_WIDE_INT pointer_alias_set;
   /* Points to a structure whose details depend on the language in use.  */