]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(c-decl.c, [...]): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION.
authorSteven Bosscher <stevenb@suse.de>
Tue, 17 Feb 2004 21:33:43 +0000 (21:33 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Tue, 17 Feb 2004 21:33:43 +0000 (21:33 +0000)
        * (c-decl.c, c-semantics.c, calls.c, cgraph.c, cgraphunit.c,
        function.c, integrate.c, print-tree.c, toplev.c, tree-optimize.c,
        tree.h): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION.
        * ada/utils.c: Likewise.
        * cp/decl.c: Likewise.
        * f/com.c: Likewise.
        * java/class.c: Likewise.

From-SVN: r77985

16 files changed:
gcc/ChangeLog
gcc/ada/utils.c
gcc/c-decl.c
gcc/c-semantics.c
gcc/calls.c
gcc/cgraph.c
gcc/cgraphunit.c
gcc/cp/decl.c
gcc/f/com.c
gcc/function.c
gcc/integrate.c
gcc/java/class.c
gcc/print-tree.c
gcc/toplev.c
gcc/tree-optimize.c
gcc/tree.h

index 109347a01a19c345d446f640220dd2675e73dc92..5ece10cfede48b14d71a387e1e5f14d003971bdc 100644 (file)
@@ -1,3 +1,13 @@
+2004-02017  Steven Bosscher  <stevenb@suse.de>
+
+       * (c-decl.c, c-semantics.c, calls.c, cgraph.c, cgraphunit.c,
+       function.c, integrate.c, print-tree.c, toplev.c, tree-optimize.c,
+       tree.h): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION.
+       * ada/utils.c: Likewise.
+       * cp/decl.c: Likewise.
+       * f/com.c: Likewise.
+       * java/class.c: Likewise.
+
 2004-02-17  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.md: Fix comment typos.
index 94176917836e07fb9a18b9dcb88a059c3677ae1c..30939d66c6a9e9e67bae959e419608bca665a873 100644 (file)
@@ -1929,7 +1929,7 @@ end_subprog_body (void)
        cico_list != 0; cico_list = TREE_CHAIN (cico_list))
     TREE_VALUE (cico_list) = 0;
 
-  if (DECL_SAVED_INSNS (current_function_decl) == 0)
+  if (DECL_STRUCT_FUNCTION (current_function_decl) == 0)
     {
       /* Throw away DECL_RTL in any PARM_DECLs unless this function
         was saved for inline, in which case the DECL_RTLs are in
index 685a9c80dfd029d534707830dca7663bcb6e213d..0f76b88eaf9d3bf9b294ddc24d3cb8b9f2089f53 100644 (file)
@@ -1441,7 +1441,7 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
        {
          DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
          DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
-         DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
+         DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
          DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
          DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
 
@@ -6066,8 +6066,9 @@ finish_function (void)
       && current_function_returns_null)
     warning ("this function may return with or without a value");
 
-  /* We're leaving the context of this function, so zap cfun.  It's still in
-     DECL_SAVED_INSNS, and we'll restore it in tree_rest_of_compilation.  */
+  /* We're leaving the context of this function, so zap cfun.
+     It's still in DECL_STRUCT_FUNCTION , and we'll restore it in
+     tree_rest_of_compilation.  */
   cfun = NULL;
 
   /* ??? Objc emits functions after finalizing the compilation unit.
@@ -6240,7 +6241,7 @@ c_pop_function_context (struct function *f)
 {
   struct language_function *p = f->language;
 
-  if (DECL_SAVED_INSNS (current_function_decl) == 0
+  if (DECL_STRUCT_FUNCTION (current_function_decl) == 0
       && DECL_SAVED_TREE (current_function_decl) == NULL_TREE)
     {
       /* Stop pointing to the local nodes about to be freed.  */
index 38c4021d6cf1d9cdbe25622815c12ac576d44cc6..17a301cffffe9b363b0bae3bca37a603bb3d5a86 100644 (file)
@@ -640,8 +640,8 @@ genrtl_scope_stmt (tree t)
        {
          if (TREE_CODE (fn) == FUNCTION_DECL
              && DECL_CONTEXT (fn) == current_function_decl
-             && DECL_SAVED_INSNS (fn)
-             && DECL_SAVED_INSNS (fn)->saved_for_inline
+             && DECL_STRUCT_FUNCTION (fn)
+             && DECL_STRUCT_FUNCTION (fn)->saved_for_inline
              && !TREE_ASM_WRITTEN (fn)
              && TREE_ADDRESSABLE (fn))
            {
index c6675758a730a57b0850dd317fa3f387d931b176..82664b5232c44822459897e92765a9eb9315a7c1 100644 (file)
@@ -1778,11 +1778,11 @@ try_to_integrate (tree fndecl, tree actparms, rtx target, int ignore,
              rtx insn = NULL_RTX, seq;
 
              /* Look for a call in the inline function code.
-                If DECL_SAVED_INSNS (fndecl)->outgoing_args_size is
+                If DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size is
                 nonzero then there is a call and it is not necessary
                 to scan the insns.  */
 
-             if (DECL_SAVED_INSNS (fndecl)->outgoing_args_size == 0)
+             if (DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size == 0)
                for (insn = first_insn; insn; insn = NEXT_INSN (insn))
                  if (GET_CODE (insn) == CALL_INSN)
                    break;
@@ -1806,8 +1806,9 @@ try_to_integrate (tree fndecl, tree actparms, rtx target, int ignore,
                     value of reg_parm_stack_space is wrong, but gives
                     correct results on all supported machines.  */
 
-                 int adjust = (DECL_SAVED_INSNS (fndecl)->outgoing_args_size
-                               + reg_parm_stack_space);
+                 int adjust =
+                       (DECL_STRUCT_FUNCTION (fndecl)->outgoing_args_size
+                        + reg_parm_stack_space);
 
                  start_sequence ();
                  emit_stack_save (SAVE_BLOCK, &old_stack_level, NULL_RTX);
@@ -2194,8 +2195,8 @@ expand_call (tree exp, rtx target, int ignore)
       if (!flag_no_inline
          && fndecl != current_function_decl
          && DECL_INLINE (fndecl)
-         && DECL_SAVED_INSNS (fndecl)
-         && DECL_SAVED_INSNS (fndecl)->inlinable)
+         && DECL_STRUCT_FUNCTION (fndecl)
+         && DECL_STRUCT_FUNCTION (fndecl)->inlinable)
        is_integrable = 1;
       else if (! TREE_ADDRESSABLE (fndecl))
        {
index e9d0b243bc4cf1458bb0ed05382df5c382f8f7cc..8cee3dfbffb76545077349ea1d56f1995429c3f8 100644 (file)
@@ -235,7 +235,7 @@ cgraph_remove_node (struct cgraph_node *node)
   if (node->next)
     node->next->previous = node->previous;
   DECL_SAVED_TREE (node->decl) = NULL;
-  DECL_SAVED_INSNS (node->decl) = NULL;
+  DECL_STRUCT_FUNCTION (node->decl) = NULL;
   DECL_ARGUMENTS (node->decl) = NULL;
   DECL_INITIAL (node->decl) = error_mark_node;
   slot = 
index 78b566f5c68c85cac1eae1750d76af3ec453265e..79bbe6d3e0fd1ba2706b157f714bba7d24ede5dc 100644 (file)
@@ -232,7 +232,7 @@ cgraph_finalize_function (tree decl, bool nested)
   /* We will never really output the function body, clear the SAVED_INSNS array
      early then.  */
   if (DECL_EXTERNAL (decl))
-    DECL_SAVED_INSNS (decl) = NULL;
+    DECL_STRUCT_FUNCTION (decl) = NULL;
 }
 
 /* Walk tree and record all calls.  Called via walk_tree.  */
@@ -481,7 +481,7 @@ cgraph_mark_functions_to_output (void)
          && !DECL_EXTERNAL (decl))
        node->output = 1;
       else
-        DECL_SAVED_INSNS (decl) = NULL;
+        DECL_STRUCT_FUNCTION (decl) = NULL;
     }
 }
 
@@ -861,7 +861,7 @@ cgraph_remove_unreachable_nodes (void)
          int local_insns;
          tree decl = node->decl;
 
-         if (DECL_SAVED_INSNS (decl))
+         if (DECL_STRUCT_FUNCTION (decl))
            local_insns = node->local.self_insns;
          else
            local_insns = 0;
index c07142915f6d0039a7b32e0fc9cf7f60813952d9..f3821c34a127640b2fe9e8d69b2b0fe2b3f75898 100644 (file)
@@ -1684,7 +1684,7 @@ duplicate_decls (tree newdecl, tree olddecl)
              && DECL_LANG_SPECIFIC (olddecl))
            {
              DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
-             DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
+             DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
            }
        }
 
@@ -10861,8 +10861,9 @@ finish_function (int flags)
       && (DECL_INLINE (fndecl) || processing_template_decl))
     warning ("no return statement in function returning non-void");
 
-  /* We're leaving the context of this function, so zap cfun.  It's still in
-     DECL_SAVED_INSNS, and we'll restore it in tree_rest_of_compilation.  */
+  /* We're leaving the context of this function, so zap cfun.
+     It's still in DECL_STRUCT_FUNCTION, and we'll restore it in
+     tree_rest_of_compilation.  */
   cfun = NULL;
   current_function_decl = NULL;
 
index 5309b84f4d2af1f200113b7c4280163c9b2871e5..ebfce0a567011e2678b4a433925d3ed350544c93 100644 (file)
@@ -13402,7 +13402,7 @@ duplicate_decls (tree newdecl, tree olddecl)
 
       DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
       DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
-      DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
+      DECL_STRUCT_FUNCTION (newdecl) = DECL_STRUCT_FUNCTION (olddecl);
       DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
     }
 
@@ -13599,7 +13599,7 @@ finish_function (int nested)
 
   if (TREE_CODE (fndecl) != ERROR_MARK
       && !nested
-      && DECL_SAVED_INSNS (fndecl) == 0)
+      && DECL_STRUCT_FUNCTION (fndecl) == 0)
     {
       /* Stop pointing to the local nodes about to be freed.  */
       /* But DECL_INITIAL must remain nonzero so we know this was an actual
@@ -13755,7 +13755,7 @@ pop_f_function_context (void)
        = TREE_VALUE (link);
 
   if (current_function_decl != error_mark_node
-      && DECL_SAVED_INSNS (current_function_decl) == 0)
+      && DECL_STRUCT_FUNCTION (current_function_decl) == 0)
     {
       /* Stop pointing to the local nodes about to be freed.  */
       /* But DECL_INITIAL must remain nonzero so we know this was an actual
@@ -14350,7 +14350,7 @@ poplevel (int keep, int reverse, int functionbody)
        if (DECL_ABSTRACT_ORIGIN (decl) != 0
            && DECL_ABSTRACT_ORIGIN (decl) != decl)
          TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1;
-       else if (DECL_SAVED_INSNS (decl) != 0)
+       else if (DECL_STRUCT_FUNCTION (decl) != 0)
          {
            push_function_context ();
            output_inline_function (decl);
index d51edde1a1acad8c49f9afd543f741eb1ec2235e..bbb9a51b0679fbc32144904522002b7f079058d9 100644 (file)
@@ -6414,7 +6414,7 @@ allocate_struct_function (tree fndecl)
   if (fndecl == NULL)
     return;
 
-  DECL_SAVED_INSNS (fndecl) = cfun;
+  DECL_STRUCT_FUNCTION (fndecl) = cfun;
   cfun->decl = fndecl;
 
   result = DECL_RESULT (fndecl);
@@ -6439,8 +6439,8 @@ allocate_struct_function (tree fndecl)
 static void
 prepare_function_start (tree fndecl)
 {
-  if (fndecl && DECL_SAVED_INSNS (fndecl))
-    cfun = DECL_SAVED_INSNS (fndecl);
+  if (fndecl && DECL_STRUCT_FUNCTION (fndecl))
+    cfun = DECL_STRUCT_FUNCTION (fndecl);
   else
     allocate_struct_function (fndecl);
   init_emit ();
index 3e05934fbcf0fb44dd2966cd7eabd5b32009c720..c50d36bdb4240b1380d1cdd88baa2c645f9baa5f 100644 (file)
@@ -414,8 +414,8 @@ copy_decl_for_inlining (tree decl, tree from_fn, tree to_fn)
 }
 
 /* Make the insns and PARM_DECLs of the current function permanent
-   and record other information in DECL_SAVED_INSNS to allow inlining
-   of this function in subsequent calls.
+   and record other information in DECL_STRUCT_FUNCTION to allow
+   inlining of this function in subsequent calls.
 
    This routine need not copy any insns because we are not going
    to immediately compile the insns in the insn chain.  There
@@ -642,7 +642,7 @@ expand_inline_function (tree fndecl, tree parms, rtx target, int ignore,
                        tree type, rtx structure_value_addr)
 {
   struct function *inlining_previous;
-  struct function *inl_f = DECL_SAVED_INSNS (fndecl);
+  struct function *inl_f = DECL_STRUCT_FUNCTION (fndecl);
   tree formal, actual, block;
   rtx parm_insns = inl_f->emit->x_first_insn;
   rtx insns = (inl_f->inl_last_parm_insn
@@ -953,7 +953,7 @@ expand_inline_function (tree fndecl, tree parms, rtx target, int ignore,
             incoming arg rtx values are expanded now so that we can be
             sure we have enough slots in the const equiv map since the
             store_expr call can easily blow the size estimate.  */
-         if (DECL_SAVED_INSNS (fndecl)->args_size != 0)
+         if (DECL_STRUCT_FUNCTION (fndecl)->args_size != 0)
            copy_rtx_and_substitute (virtual_incoming_args_rtx, map, 0);
        }
       else if (GET_CODE (loc) == REG)
@@ -1886,7 +1886,8 @@ copy_rtx_and_substitute (rtx orig, struct inline_remap *map, int for_lhs)
       regno = REGNO (orig);
       if (regno <= LAST_VIRTUAL_REGISTER
          || (map->integrating
-             && DECL_SAVED_INSNS (map->fndecl)->internal_arg_pointer == orig))
+             && DECL_STRUCT_FUNCTION (map->fndecl)->internal_arg_pointer
+                == orig))
        {
          /* Some hard registers are also mapped,
             but others are not translated.  */
@@ -1904,10 +1905,11 @@ copy_rtx_and_substitute (rtx orig, struct inline_remap *map, int for_lhs)
          else if (regno == VIRTUAL_STACK_VARS_REGNUM)
            {
              rtx loc, seq;
-             int size = get_func_frame_size (DECL_SAVED_INSNS (map->fndecl));
+             int size
+               = get_func_frame_size (DECL_STRUCT_FUNCTION (map->fndecl));
 #ifdef FRAME_GROWS_DOWNWARD
              int alignment
-               = (DECL_SAVED_INSNS (map->fndecl)->stack_alignment_needed
+               = (DECL_STRUCT_FUNCTION (map->fndecl)->stack_alignment_needed
                   / BITS_PER_UNIT);
 
              /* In this case, virtual_stack_vars_rtx points to one byte
@@ -1942,13 +1944,13 @@ copy_rtx_and_substitute (rtx orig, struct inline_remap *map, int for_lhs)
            }
          else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM
                   || (map->integrating
-                      && (DECL_SAVED_INSNS (map->fndecl)->internal_arg_pointer
+                      && (DECL_STRUCT_FUNCTION (map->fndecl)->internal_arg_pointer
                           == orig)))
            {
              /* Do the same for a block to contain any arguments referenced
                 in memory.  */
              rtx loc, seq;
-             int size = DECL_SAVED_INSNS (map->fndecl)->args_size;
+             int size = DECL_STRUCT_FUNCTION (map->fndecl)->args_size;
 
              start_sequence ();
              loc = assign_stack_temp (BLKmode, size, 1);
@@ -2956,8 +2958,8 @@ set_decl_abstract_flags (tree decl, int setting)
     }
 }
 \f
-/* Output the assembly language code for the function FNDECL
-   from its DECL_SAVED_INSNS.  Used for inline functions that are output
+/* Output the assembly language code for the function FNDECL from
+   its DECL_STRUCT_FUNCTION.  Used for inline functions that are output
    at end of compilation instead of where they came in the source.  */
 
 static GTY(()) struct function *old_cfun;
@@ -2967,7 +2969,7 @@ output_inline_function (tree fndecl)
 {
   enum debug_info_type old_write_symbols = write_symbols;
   const struct gcc_debug_hooks *const old_debug_hooks = debug_hooks;
-  struct function *f = DECL_SAVED_INSNS (fndecl);
+  struct function *f = DECL_STRUCT_FUNCTION (fndecl);
 
   old_cfun = cfun;
   cfun = f;
index 58cf778ecba9e3d84cd6c6485d77bd4066466957..f6471ef5c490240347c805b3caee5b97114fd0bf 100644 (file)
@@ -1710,7 +1710,7 @@ finish_class (void)
   /* Emit deferred inline methods. */  
   for (method = type_methods; method != NULL_TREE; )
     {
-      if (! TREE_ASM_WRITTEN (method) && DECL_SAVED_INSNS (method) != 0)
+      if (! TREE_ASM_WRITTEN (method) && DECL_STRUCT_FUNCTION (method) != 0)
        {
          output_inline_function (method);
          /* Scan the list again to see if there are any earlier
index 2965d6ee574963b1105d35df115c2e73ea28446f..df566fbe645259c29eb62e42363e48765fdce2d2 100644 (file)
@@ -440,11 +440,11 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
            }
        }
       else if (TREE_CODE (node) == FUNCTION_DECL
-              && DECL_SAVED_INSNS (node) != 0)
+              && DECL_STRUCT_FUNCTION (node) != 0)
        {
          indent_to (file, indent + 4);
          fprintf (file, "saved-insns " HOST_PTR_PRINTF,
-                  (void *) DECL_SAVED_INSNS (node));
+                  (void *) DECL_STRUCT_FUNCTION (node));
        }
 
       /* Print the decl chain only if decl is at second level.  */
index 7473eade90a0e4d7d57ddaa89a83bfabeef66bb8..09978fccb5a37f00b6835e9c7bcf64cad1b9b520 100644 (file)
@@ -1658,8 +1658,8 @@ wrapup_global_declarations (tree *vec, int len)
 
          if (TREE_CODE (decl) == FUNCTION_DECL
              && DECL_INITIAL (decl) != 0
-             && DECL_SAVED_INSNS (decl) != 0
-             && DECL_SAVED_INSNS (decl)->saved_for_inline
+             && DECL_STRUCT_FUNCTION (decl) != 0
+             && DECL_STRUCT_FUNCTION (decl)->saved_for_inline
              && (flag_keep_inline_functions
                  || (TREE_PUBLIC (decl) && !DECL_COMDAT (decl))
                  || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
@@ -2677,7 +2677,8 @@ rest_of_handle_inlining (tree decl)
 
   if (open_dump_file (DFI_rtl, decl))
     {
-      if (DECL_SAVED_INSNS (decl) && DECL_SAVED_INSNS (decl)->saved_for_inline)
+      if (DECL_STRUCT_FUNCTION (decl)
+         && DECL_STRUCT_FUNCTION (decl)->saved_for_inline)
        fprintf (rtl_dump_file, ";; (integrable)\n\n");
       close_dump_file (DFI_rtl, print_rtl, insns);
     }
@@ -2747,7 +2748,7 @@ rest_of_handle_inlining (tree decl)
       timevar_push (TV_INTEGRATION);
       save_for_inline (decl);
       timevar_pop (TV_INTEGRATION);
-      DECL_SAVED_INSNS (decl)->inlinable = inlinable;
+      DECL_STRUCT_FUNCTION (decl)->inlinable = inlinable;
       return true;
     }
 
@@ -3678,7 +3679,7 @@ rest_of_compilation (tree decl)
   if (! DECL_DEFER_OUTPUT (decl))
     {
       free_after_compilation (cfun);
-      DECL_SAVED_INSNS (decl) = 0;
+      DECL_STRUCT_FUNCTION (decl) = 0;
     }
   cfun = 0;
 
index 9df5adbd79e40e8b835fce5a3b4b5e1ae0632c04..35220167a9521c5d5373efd349568ad0d3a7f683 100644 (file)
@@ -208,7 +208,7 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
   if (!cgraph_function_possibly_inlined_p (fndecl))
     {
       DECL_SAVED_TREE (fndecl) = NULL;
-      if (DECL_SAVED_INSNS (fndecl) == 0
+      if (DECL_STRUCT_FUNCTION (fndecl) == 0
          && !cgraph_node (fndecl)->origin)
        {
          /* Stop pointing to the local nodes about to be freed.
index 3399d30f200d73502e16b2fdbce0ff86036c4fb5..ee1f50c8c09858568af7cd988d16f134bf3e4cdf 100644 (file)
@@ -1375,8 +1375,9 @@ struct tree_type GTY(())
    where the data was actually passed.  */
 #define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->decl.u2.r)
 
-/* For FUNCTION_DECL, if it is inline, holds the saved insn chain.  */
-#define DECL_SAVED_INSNS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u2.f)
+/* For FUNCTION_DECL, this holds a pointer to a structure ("struct function")
+   that describes the status of this function.  */
+#define DECL_STRUCT_FUNCTION(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.u2.f)
 
 /* For FUNCTION_DECL, if it is built-in,
    this identifies which built-in operation it is.  */