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]

post_compilation_data patch


Hi
This is updated version of my patch with Mark's comments applied.
About the copying unions, it has turned out that in most cases we know
that we are copying func_decls, so we know proper accesor macro for the
union.
I've hit some places, where union is set to 0 in fields handling code.
I've changed them to memset, since I am not sure if DECL_ALIGN is the
correct choice or if really whole union needs to be cleared.

I've also found that DECL_FRAME_SIZE is only zeroed and never set to different
value, so I've removed corresponding code and DECL_FRAME_SIZE entirely.

Interestingly enought the patch fixes couple of c testsuite failures for me.
I am currently running c++ testsuite and patch seems to work fine
(the older version passed so hope this one too)

Honza

Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	Remove DECL_FRAME_SIZE; introduce post_compilation_data.
	* Makefile.in (print-tree.c): Add dependancy on function.h and rtl.h
	* c-decl.c (duplicate_decls): to copy align field; copy DECL_PCD
	instead of DECL_SAVED_INSNS and DECL_FRAME_SIZE.
	(pushdecl): Likewise.
	* calls.c (expand_call): Propagate preferred_stack_boundary.
	* function.c (expand_function_start): Initialize DECL_PCD
	of current_function_decl.
	* function.h (post_compilation_data): New structure.
	* ggc-common.c (ggc_mark_tree_children): Mark DECL_PCD field.
	* integrate.c (save_for_inline_nocopy): Use DECL_PCD instead of
	DECL_SAVED_INSNS, do not handle DECL_FRAME_SIZE.
	* print-tree.c: Do not print DECL_FRAME_SIZE, print DECL_PCD instead
	DECL_SAVED_INSNS.
	* toplev.c (rest_of_compilation): Caluclate preferred_stack_boundary.
	* tree.h (u2 field): Add pcd field.
	(DECL_PCD): New.
	(DECL_FRAME_SIZE): Remove.
	(DECL_SAVED_INSNS): Use frame_size field of post_compilation_data.

Ch:
Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	Remove DECL_FRAME_SIZE; introduce post_compilation_data.
	* decl.c: Include rtl.h and function.h.

Cp:
Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	Remove DECL_FRAME_SIZE; introduce post_compilation_data.
	* class.c (check_field_decls): Use memset to clear u2 union field.
	(build_vtbl_or_vbase_field): Likewise.
	(check_methods): Clear DECL_PCD instad of DECL_SAVED_INSNS.
	* decl.c  (store_parm_decls): Likewise.
	(duplicate_decls): Copy DECL_PCD instead of
	DECL_FRAME_SIZE and DECL_SAVED_INSNS.

F:
Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	Remove DECL_FRAME_SIZE; introduce post_compilation_data.
	* Makefile.in (FUNCTION_H): New variable.
	(f/com.c): Add dependency on function.h.
	* com.c: Include function.h.
	(ffecom_decl_field): Clear u1 field using memset.
	(ffecom_init): Likewise.
	(duplicate_decls): Use DECL_PCD instead of DECL_SAVED_INSNS
	and DECL_FRAME_SIZE.

Java:
Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	Remove DECL_FRAME_SIZE; introduce post_compilation_data.
	* java/parse.h (DECL_END_SOURCE_LINE): Do not use DECL_FRAME_SIZE.
	* java/Makefile.in (class.o): Add dependancy on function.h.
	* java/class.c: Include function.h

Index: egcs/gcc/c-decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-decl.c,v
retrieving revision 1.102
diff -c -3 -p -r1.102 c-decl.c
*** c-decl.c	2000/03/08 11:21:26	1.102
--- c-decl.c	2000/03/16 13:26:27
*************** duplicate_decls (newdecl, olddecl, diffe
*** 1933,1940 ****
  	    }
  	}
        /* Also preserve various other info from the definition.  */
-       else if (! new_is_definition)
- 	DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
        if (! new_is_definition)
  	{
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
--- 1933,1938 ----
*************** duplicate_decls (newdecl, olddecl, diffe
*** 1943,1949 ****
  	     declarations into function definitions.  */
  	  if (! different_binding_level)
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
! 	  DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
  	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
  	  if (DECL_INLINE (newdecl))
  	    DECL_ABSTRACT_ORIGIN (newdecl) = DECL_ORIGIN (olddecl);
--- 1941,1947 ----
  	     declarations into function definitions.  */
  	  if (! different_binding_level)
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
! 	  DECL_PCD (newdecl) = DECL_PCD (olddecl);
  	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
  	  if (DECL_INLINE (newdecl))
  	    DECL_ABSTRACT_ORIGIN (newdecl) = DECL_ORIGIN (olddecl);
*************** pushdecl (x)
*** 2305,2312 ****
  		      DECL_INLINE (x) = DECL_INLINE (oldglobal);
  		      DECL_INITIAL (x) = (current_function_decl == oldglobal
  					  ? 0 : DECL_INITIAL (oldglobal));
! 		      DECL_SAVED_INSNS (x) = DECL_SAVED_INSNS (oldglobal);
! 		      DECL_FRAME_SIZE (x) = DECL_FRAME_SIZE (oldglobal);
  		      DECL_ARGUMENTS (x) = DECL_ARGUMENTS (oldglobal);
  		      DECL_RESULT (x) = DECL_RESULT (oldglobal);
  		      TREE_ASM_WRITTEN (x) = TREE_ASM_WRITTEN (oldglobal);
--- 2303,2309 ----
  		      DECL_INLINE (x) = DECL_INLINE (oldglobal);
  		      DECL_INITIAL (x) = (current_function_decl == oldglobal
  					  ? 0 : DECL_INITIAL (oldglobal));
! 		      DECL_PCD (x) = DECL_PCD (oldglobal);
  		      DECL_ARGUMENTS (x) = DECL_ARGUMENTS (oldglobal);
  		      DECL_RESULT (x) = DECL_RESULT (oldglobal);
  		      TREE_ASM_WRITTEN (x) = TREE_ASM_WRITTEN (oldglobal);
Index: egcs/gcc/calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.92
diff -c -3 -p -r1.92 calls.c
*** calls.c	2000/03/16 07:43:43	1.92
--- calls.c	2000/03/16 13:26:29
*************** expand_call (exp, target, ignore)
*** 1737,1742 ****
--- 1737,1745 ----
  	fndecl = 0;
        else
  	{
+ 	  if (DECL_PCD (fndecl))
+ 	    preferred_stack_boundary
+ 	      = DECL_PCD (fndecl)->preferred_stack_boundary;
  	  if (!flag_no_inline
  	      && fndecl != current_function_decl
  	      && DECL_INLINE (fndecl)
Index: egcs/gcc/function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.175
diff -c -3 -p -r1.175 function.c
*** function.c	2000/03/14 17:48:48	1.175
--- function.c	2000/03/16 13:26:33
*************** expand_function_start (subr, parms_have_
*** 5944,5949 ****
--- 5944,5958 ----
  {
    tree tem;
    rtx last_ptr = NULL_RTX;
+   struct post_compilation_data *perm;
+ 
+   /* Initialize permanent function data.  */
+   perm = ((struct post_compilation_data *)
+ 	  ggc_alloc_obj (sizeof (struct post_compilation_data), 1));
+   perm->preferred_stack_boundary = PREFERRED_STACK_BOUNDARY;
+   perm->function = NULL;
+ 
+   DECL_PCD (current_function_decl) = perm;
  
    /* Make sure volatile mem refs aren't considered
       valid operands of arithmetic insns.  */
Index: egcs/gcc/function.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.h,v
retrieving revision 1.50
diff -c -3 -p -r1.50 function.h
*** function.h	2000/03/07 20:39:04	1.50
--- function.h	2000/03/16 13:26:33
*************** struct function
*** 475,480 ****
--- 475,493 ----
    rtx epilogue_delay_list;
  };
  
+ /* This structure is used to save information about already parsed function
+    we want to preserve once function is compiled.  The structure is available
+    from DECL tree node of known functions.  */
+ struct post_compilation_data
+ {
+   /* Stack boundary function expect at entry.  */
+   int preferred_stack_boundary;
+ 
+   /* Used by integrate.c.  */
+   struct function *function;
+   rtx *saved_insns;
+ };
+ 
  /* The function currently being compiled.  */
  extern struct function *cfun;
  
Index: egcs/gcc/ggc-common.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ggc-common.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 ggc-common.c
*** ggc-common.c	2000/02/20 01:10:48	1.21
--- ggc-common.c	2000/03/16 13:26:34
*************** ggc_mark_tree_children (t)
*** 359,364 ****
--- 359,369 ----
        ggc_mark_string (TREE_STRING_POINTER (t));
        break;
  
+     case FUNCTION_DECL:
+       if (DECL_PCD (t))
+         ggc_mark_string (DECL_PCD (t));
+       break;
+ 
      case PARM_DECL:
        ggc_mark_rtx (DECL_INCOMING_RTL (t));
        break;
Index: egcs/gcc/integrate.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/integrate.c,v
retrieving revision 1.95
diff -c -3 -p -r1.95 integrate.c
*** integrate.c	2000/02/27 02:43:43	1.95
--- integrate.c	2000/03/16 13:26:34
*************** save_for_inline_nocopy (fndecl)
*** 444,450 ****
    cfun->inl_last_parm_insn = cfun->x_last_parm_insn;
    cfun->original_arg_vector = argvec;
    cfun->original_decl_initial = DECL_INITIAL (fndecl);
!   DECL_SAVED_INSNS (fndecl) = cfun;
  
    /* Clean up.  */
    free (parmdecl_map);
--- 444,450 ----
    cfun->inl_last_parm_insn = cfun->x_last_parm_insn;
    cfun->original_arg_vector = argvec;
    cfun->original_decl_initial = DECL_INITIAL (fndecl);
!   DECL_PCD (fndecl)->function = cfun;
  
    /* Clean up.  */
    free (parmdecl_map);
*************** expand_inline_function (fndecl, parms, t
*** 851,859 ****
  	     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_FRAME_SIZE (fndecl) != 0)
- 	    copy_rtx_and_substitute (virtual_stack_vars_rtx, map, 0);
- 
  	  if (DECL_SAVED_INSNS (fndecl)->args_size != 0)
  	    copy_rtx_and_substitute (virtual_incoming_args_rtx, map, 0);
  	}
--- 851,856 ----
Index: egcs/gcc/print-tree.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/print-tree.c,v
retrieving revision 1.26
diff -c -3 -p -r1.26 print-tree.c
*** print-tree.c	2000/03/09 20:34:50	1.26
--- print-tree.c	2000/03/16 13:26:34
*************** print_node (file, prefix, node, indent)
*** 407,417 ****
  
        if (TREE_CODE (node) != FUNCTION_DECL)
  	fprintf (file, " align %d", DECL_ALIGN (node));
-       else if (DECL_INLINE (node))
- 	{
- 	  fprintf (file, " frame_size ");
- 	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, DECL_FRAME_SIZE (node));
- 	}
        else if (DECL_BUILT_IN (node))
  	fprintf (file, " built-in %s:%s",
  		 built_in_class_names[(int) DECL_BUILT_IN_CLASS (node)],
--- 407,412 ----
*************** print_node (file, prefix, node, indent)
*** 441,447 ****
  	  print_rtl (file, DECL_RTL (node));
  	}
  
!       if (DECL_SAVED_INSNS (node) != 0)
  	{
  	  indent_to (file, indent + 4);
  	  if (TREE_CODE (node) == PARM_DECL)
--- 436,442 ----
  	  print_rtl (file, DECL_RTL (node));
  	}
  
!       if (DECL_PCD (node) != 0)
  	{
  	  indent_to (file, indent + 4);
  	  if (TREE_CODE (node) == PARM_DECL)
*************** print_node (file, prefix, node, indent)
*** 451,459 ****
  	    }
  	  else if (TREE_CODE (node) == FUNCTION_DECL)
  	    {
! 	      fprintf (file, "saved-insns ");
  	      fprintf (file, HOST_PTR_PRINTF,
!  		       (char *) DECL_SAVED_INSNS (node));
  	    }
  	}
  
--- 446,454 ----
  	    }
  	  else if (TREE_CODE (node) == FUNCTION_DECL)
  	    {
! 	      fprintf (file, "post-compilation-data ");
  	      fprintf (file, HOST_PTR_PRINTF,
!  		       (char *) DECL_PCD (node));
  	    }
  	}
  
Index: egcs/gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.305
diff -c -3 -p -r1.305 toplev.c
*** toplev.c	2000/03/14 14:38:52	1.305
--- toplev.c	2000/03/16 13:26:35
*************** rest_of_compilation (decl)
*** 3539,3544 ****
--- 3539,3549 ----
  	     find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
  	   });
  
+   /* Calculate preferred_stack_boundary for this function, that ought
+      to be known at this point of compilation.  */
+   DECL_PCD (current_function_decl)->preferred_stack_boundary
+     = MAX (cfun->stack_alignment_needed, cfun->preferred_stack_boundary);
+ 
    /* On some machines, the prologue and epilogue code, or parts thereof,
       can be represented as RTL.  Doing so lets us schedule insns between
       it and the rest of the code and also allows delayed branch
Index: egcs/gcc/tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/tree.h,v
retrieving revision 1.142
diff -c -3 -p -r1.142 tree.h
*** tree.h	2000/03/13 22:54:03	1.142
--- tree.h	2000/03/16 13:26:36
*************** struct tree_type
*** 1172,1182 ****
  /* For PARM_DECL, holds an RTL for the stack slot or register
     where the data was actually passed.  */
  #define DECL_INCOMING_RTL(NODE) (DECL_CHECK (NODE)->decl.u2.r)
! /* For FUNCTION_DECL, if it is inline, holds the saved insn chain.  */
! #define DECL_SAVED_INSNS(NODE) (DECL_CHECK (NODE)->decl.u2.f)
! /* For FUNCTION_DECL, if it is inline,
!    holds the size of the stack frame, as an integer.  */
! #define DECL_FRAME_SIZE(NODE) (DECL_CHECK (NODE)->decl.u1.i)
  /* For FUNCTION_DECL, if it is built-in,
     this identifies which built-in operation it is.  */
  #define DECL_FUNCTION_CODE(NODE) (DECL_CHECK (NODE)->decl.u1.f)
--- 1172,1181 ----
  /* For PARM_DECL, holds an RTL for the stack slot or register
     where the data was actually passed.  */
  #define DECL_INCOMING_RTL(NODE) (DECL_CHECK (NODE)->decl.u2.r)
! /* For FUNCTION_DECL, if it is known, it contains pointer to
!    post_compilation_data.  */
! #define DECL_PCD(NODE) (DECL_CHECK (NODE)->decl.u2.pcd)
! #define DECL_SAVED_INSNS(NODE) (DECL_PCD(NODE) ? DECL_PCD (NODE)->function : NULL)
  /* For FUNCTION_DECL, if it is built-in,
     this identifies which built-in operation it is.  */
  #define DECL_FUNCTION_CODE(NODE) (DECL_CHECK (NODE)->decl.u1.f)
*************** struct tree_decl
*** 1461,1472 ****
    struct rtx_def *rtl;	/* RTL representation for object.  */
    struct rtx_def *live_range_rtl;
  
!   /* In FUNCTION_DECL, if it is inline, holds the saved insn chain.
       In PARM_DECL, holds an RTL for the stack slot
       of register where the data was actually passed.
       Used by Chill and Java in LABEL_DECL and by C++ and Java in VAR_DECL.  */
    union {
!     struct function *f;
      struct rtx_def *r;
      union tree_node *t;
      int i;
--- 1460,1472 ----
    struct rtx_def *rtl;	/* RTL representation for object.  */
    struct rtx_def *live_range_rtl;
  
!   /* In FUNCTION_DECL, if it is inline, holds the pointer
!      to post_compilation_data structure.
       In PARM_DECL, holds an RTL for the stack slot
       of register where the data was actually passed.
       Used by Chill and Java in LABEL_DECL and by C++ and Java in VAR_DECL.  */
    union {
!     struct post_compilation_data *pcd;
      struct rtx_def *r;
      union tree_node *t;
      int i;
Index: egcs/gcc/ch/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/Makefile.in,v
retrieving revision 1.22
diff -c -3 -p -r1.22 Makefile.in
*** Makefile.in	2000/02/26 13:51:58	1.22
--- Makefile.in	2000/03/16 13:26:36
*************** convert.o : convert.c $(CONFIG_H) $(CHIL
*** 269,275 ****
  	$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
  	$(srcdir)/../convert.h
  decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
! 	$(srcdir)/../system.h $(srcdir)/../toplev.h
  except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
  	$(srcdir)/../system.h $(srcdir)/../toplev.h
  expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
--- 269,276 ----
  	$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
  	$(srcdir)/../convert.h
  decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
! 	$(srcdir)/../system.h $(srcdir)/../toplev.h \
! 	$(srcdir)/../rtl.h $(srcdir)/../function.h
  except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
  	$(srcdir)/../system.h $(srcdir)/../toplev.h
  expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
Index: egcs/gcc/ch/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/decl.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 decl.c
*** decl.c	2000/02/29 23:33:49	1.21
--- decl.c	2000/03/16 13:26:37
*************** Boston, MA 02111-1307, USA.  */
*** 183,188 ****
--- 183,190 ----
  
  #include "config.h"
  #include "system.h"
+ #include "rtl.h"
+ #include "function.h"
  #include "tree.h"
  #include "flags.h"
  #include "ch-tree.h"
Index: egcs/gcc/config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.143
diff -c -3 -p -r1.143 i386.md
*** i386.md	2000/03/15 12:34:40	1.143
--- i386.md	2000/03/16 13:26:38
***************
*** 1400,1406 ****
    [(set (attr "type")
       (cond [(and (eq_attr "alternative" "0")
  		 (eq (symbol_ref "TARGET_PARTIAL_REG_STALL")
! 			(const_int 0)))
  	      (const_string "imov")
  	    (and (eq_attr "alternative" "1,2")
  		 (match_operand:HI 1 "aligned_operand" ""))
--- 1400,1406 ----
    [(set (attr "type")
       (cond [(and (eq_attr "alternative" "0")
  		 (eq (symbol_ref "TARGET_PARTIAL_REG_STALL")
! 		     (const_int 0)))
  	      (const_string "imov")
  	    (and (eq_attr "alternative" "1,2")
  		 (match_operand:HI 1 "aligned_operand" ""))
Index: egcs/gcc/cp/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.269
diff -c -3 -p -r1.269 class.c
*** class.c	2000/03/15 00:16:21	1.269
--- class.c	2000/03/16 13:26:40
*************** check_field_decls (t, access_decls, empt
*** 3930,3936 ****
        if (type == error_mark_node)
  	continue;
  	  
!       DECL_SAVED_INSNS (x) = 0;
  
        /* When this goes into scope, it will be a non-local reference.  */
        DECL_NONLOCAL (x) = 1;
--- 3930,3936 ----
        if (type == error_mark_node)
  	continue;
  	  
!       memset (&x->decl.u2, 0, sizeof (x->decl.u2));
  
        /* When this goes into scope, it will be a non-local reference.  */
        DECL_NONLOCAL (x) = 1;
*************** build_vtbl_or_vbase_field (name, assembl
*** 4087,4093 ****
    DECL_ARTIFICIAL (field) = 1;
    DECL_FIELD_CONTEXT (field) = class_type;
    DECL_FCONTEXT (field) = fcontext;
!   DECL_SAVED_INSNS (field) = 0;
    DECL_ALIGN (field) = TYPE_ALIGN (type);
  
    /* Return it.  */
--- 4087,4093 ----
    DECL_ARTIFICIAL (field) = 1;
    DECL_FIELD_CONTEXT (field) = class_type;
    DECL_FCONTEXT (field) = fcontext;
!   memset (&field->decl.u2, 0, sizeof (field->decl.u2));
    DECL_ALIGN (field) = TYPE_ALIGN (type);
  
    /* Return it.  */
*************** check_methods (t)
*** 4399,4405 ****
        if (IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (x)))
  	continue;
  
!       DECL_SAVED_INSNS (x) = 0;
        check_for_override (x, t);
        if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x))
  	cp_error_at ("initializer specified for non-virtual method `%D'", x);
--- 4399,4405 ----
        if (IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (x)))
  	continue;
  
!       DECL_PCD (x) = 0;
        check_for_override (x, t);
        if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x))
  	cp_error_at ("initializer specified for non-virtual method `%D'", x);
Index: egcs/gcc/cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.570
diff -c -3 -p -r1.570 decl.c
*** decl.c	2000/03/15 10:40:26	1.570
--- decl.c	2000/03/16 13:26:47
*************** duplicate_decls (newdecl, olddecl)
*** 3625,3635 ****
  		 regardless of declaration matches.  */
  	      DECL_RTL (newdecl) = DECL_RTL (olddecl);
  	    }
- 	  else
- 	    DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
  
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
! 	  if ((DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl)))
  	    /* Previously saved insns go together with
  	       the function's previous definition.  */
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
--- 3625,3634 ----
  		 regardless of declaration matches.  */
  	      DECL_RTL (newdecl) = DECL_RTL (olddecl);
  	    }
  
+ 	  DECL_PCD (newdecl) = DECL_PCD (olddecl);
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
! 	  if ((DECL_SAVED_INSNS (newdecl)))
  	    /* Previously saved insns go together with
  	       the function's previous definition.  */
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
*************** store_parm_decls ()
*** 13610,13616 ****
      storedecls (chainon (nonparms, DECL_ARGUMENTS (fndecl)));
  
    /* Initialize the RTL code for the function.  */
!   DECL_SAVED_INSNS (fndecl) = 0;
    if (! building_stmt_tree ())
      expand_function_start (fndecl, parms_have_cleanups);
  
--- 13609,13615 ----
      storedecls (chainon (nonparms, DECL_ARGUMENTS (fndecl)));
  
    /* Initialize the RTL code for the function.  */
!   DECL_PCD (fndecl) = 0;
    if (! building_stmt_tree ())
      expand_function_start (fndecl, parms_have_cleanups);
  
Index: egcs/gcc/f/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/Makefile.in,v
retrieving revision 1.20
diff -c -3 -p -r1.20 Makefile.in
*** Makefile.in	2000/02/26 20:02:00	1.20
--- Makefile.in	2000/03/16 13:26:47
*************** OUTPUT_H = $(srcdir)/output.j $(srcdir)/
*** 233,238 ****
--- 233,239 ----
  RTL_H = $(srcdir)/rtl.j $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
  	$(srcdir)/../machmode.h $(srcdir)/../machmode.def
  SYSTEM_H = $(srcdir)/system.j $(srcdir)/../system.h
+ FUNCTION_H = $(srcdir)/system.j $(srcdir)/../system.h
  TCONFIG_H = $(srcdir)/tconfig.j ../tconfig.h
  TM_H = $(srcdir)/tm.j ../tm.h
  TOPLEV_H = $(srcdir)/toplev.j $(srcdir)/../toplev.h
*************** com.o: com.c proj.h $(CONFIG_H) $(SYSTEM
*** 266,272 ****
   malloc.h info.h info-b.def info-k.def info-w.def target.h bad.h \
   bad.def where.h $(GLIMITS_H) top.h lex.h type.h intrin.h intrin.def \
   lab.h symbol.h symbol.def equiv.h storag.h global.h name.h expr.h \
!  implic.h src.h st.h $(GGC_H)
  data.o: data.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) data.h bld.h \
   bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
   info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
--- 267,273 ----
   malloc.h info.h info-b.def info-k.def info-w.def target.h bad.h \
   bad.def where.h $(GLIMITS_H) top.h lex.h type.h intrin.h intrin.def \
   lab.h symbol.h symbol.def equiv.h storag.h global.h name.h expr.h \
!  implic.h src.h st.h $(GGC_H) $(FUNCTION_H)
  data.o: data.c proj.h $(CONFIG_H) $(SYSTEM_H) $(ASSERT_H) data.h bld.h \
   bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
   info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
Index: egcs/gcc/f/com.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/com.c,v
retrieving revision 1.81
diff -c -3 -p -r1.81 com.c
*** com.c	2000/03/10 08:44:50	1.81
--- com.c	2000/03/16 13:26:51
*************** the Free Software Foundation, 59 Temple 
*** 90,95 ****
--- 90,96 ----
  #if FFECOM_targetCURRENT == FFECOM_targetGCC
  #include "flags.j"
  #include "rtl.j"
+ #include "function.h"
  #include "toplev.j"
  #include "tree.j"
  #include "output.j"  /* Must follow tree.j so TREE_CODE is defined! */
*************** ffecom_decl_field (tree context, tree pr
*** 11000,11006 ****
  
    field = build_decl (FIELD_DECL, get_identifier (name), type);
    DECL_CONTEXT (field) = context;
!   DECL_FRAME_SIZE (field) = 0;
    if (prevfield != NULL_TREE)
      TREE_CHAIN (prevfield) = field;
  
--- 11001,11007 ----
  
    field = build_decl (FIELD_DECL, get_identifier (name), type);
    DECL_CONTEXT (field) = context;
!   memset (&field->decl.u1, 0, sizeof (field->decl.u1));
    if (prevfield != NULL_TREE)
      TREE_CHAIN (prevfield) = field;
  
*************** ffecom_init_0 ()
*** 12056,12062 ****
  						 ffecom_tree_type[i][j]);
  	DECL_CONTEXT (ffecom_multi_fields_[i][j])
  	  = ffecom_multi_type_node_;
! 	DECL_FRAME_SIZE (ffecom_multi_fields_[i][j]) = 0;
  	TREE_CHAIN (ffecom_multi_fields_[i][j]) = field;
  	field = ffecom_multi_fields_[i][j];
        }
--- 12057,12064 ----
  						 ffecom_tree_type[i][j]);
  	DECL_CONTEXT (ffecom_multi_fields_[i][j])
  	  = ffecom_multi_type_node_;
! 	memset (&ffecom_multi_fields_[i][j]->decl.u1, 0,
! 		sizeof (ffecom_multi_fields_[i][j]->decl.u1));
  	TREE_CHAIN (ffecom_multi_fields_[i][j]) = field;
  	field = ffecom_multi_fields_[i][j];
        }
*************** duplicate_decls (tree newdecl, tree oldd
*** 13903,13914 ****
  	  DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
  	  DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
  	}
-       else
- 	DECL_FRAME_SIZE (newdecl) = DECL_FRAME_SIZE (olddecl);
  
        DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
        DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
!       DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
        DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
      }
  
--- 13905,13914 ----
  	  DECL_BUILT_IN_CLASS (newdecl) = DECL_BUILT_IN_CLASS (olddecl);
  	  DECL_FUNCTION_CODE (newdecl) = DECL_FUNCTION_CODE (olddecl);
  	}
  
        DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
        DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
!       DECL_PCD (newdecl) = DECL_PCD (olddecl);
        DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
      }
  
Index: egcs/gcc/java/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/Makefile.in,v
retrieving revision 1.50
diff -c -3 -p -r1.50 Makefile.in
*** Makefile.in	2000/03/04 22:27:35	1.50
--- Makefile.in	2000/03/16 13:26:52
*************** check-init.o : check-init.c $(CONFIG_H) 
*** 276,282 ****
    $(JAVA_TREE_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
  class.o : class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) jcf.h $(PARSE_H) \
    $(srcdir)/../gansidecl.h $(srcdir)/../toplev.h $(srcdir)/../system.h \
!   $(srcdir)/../output.h
  constants.o : constants.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
    $(srcdir)/../toplev.h $(srcdir)/../system.h
  decl.o : decl.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
--- 276,282 ----
    $(JAVA_TREE_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
  class.o : class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) jcf.h $(PARSE_H) \
    $(srcdir)/../gansidecl.h $(srcdir)/../toplev.h $(srcdir)/../system.h \
!   $(srcdir)/../output.h $(srcdir)/../function.h
  constants.o : constants.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
    $(srcdir)/../toplev.h $(srcdir)/../system.h
  decl.o : decl.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h \
Index: egcs/gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/class.c,v
retrieving revision 1.58
diff -c -3 -p -r1.58 class.c
*** class.c	2000/03/14 05:01:04	1.58
--- class.c	2000/03/16 13:26:54
*************** The Free Software Foundation is independ
*** 28,33 ****
--- 28,34 ----
  #include "system.h"
  #include "tree.h"
  #include "rtl.h"
+ #include "function.h"
  #include "flags.h"
  #include "java-tree.h"
  #include "jcf.h"
Index: egcs/gcc/java/parse.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.h,v
retrieving revision 1.47
diff -c -3 -p -r1.47 parse.h
*** parse.h	2000/03/14 05:01:05	1.47
--- parse.h	2000/03/16 13:26:55
*************** typedef struct _jdeplist {
*** 702,708 ****
  #define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth]
  
  /* Macro for the xreferencer */
! #define DECL_END_SOURCE_LINE(DECL)       DECL_FRAME_SIZE (DECL)
  #define DECL_INHERITED_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u2.i)
       
  /* Parser context data structure. */
--- 702,708 ----
  #define CURRENT_OSB(C) (C)->osb_number [(C)->osb_depth]
  
  /* Macro for the xreferencer */
! #define DECL_END_SOURCE_LINE(DECL)       (DECL_CHECK (DECL)->decl.u1.i)
  #define DECL_INHERITED_SOURCE_LINE(DECL) (DECL_CHECK (DECL)->decl.u2.i)
       
  /* Parser context data structure. */

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