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]

preferred_stack_boundary propagation patch + structure for permanent function data


Hi
This patch adds new perm_function structure used to store thinks we want to
remember about already compiled functions such as saved insns,
preferred_stack_boundary, list of clobbered registers and memory locations and
other info we may want to use in future.  I believe this is better way than
overusing the tree node fields again and again.

It also adds the propagation bits to preferred_stack_boundary, but they don't
do anything usefull now, because of the reload alignment problem.

The patch is quite long, because I've had to change frontends to avoid
using DECL_FRAME_SIZE to reset alignment of structure fields and also
I was forced to include function.h and rtl.h to some files in order to
get DECL_SAVED_INSNS working.

Right now the perm_function is initialized once rtl generation starts.
We may want to do this earlier in future and use it for the tree iniliner
as well.

Honza

Mon Feb  7 20:54:58 MET 2000  Jan Hubicka  <jh@suse.cz>
	* Makefile.in (print-tree.c): Add dependancy on function.h and rtl.h
	* c-decl.c (duplicate_decls): Use DECL_ALIGN instead of DECL_FRAME_SIZE
	to copy align field; copy DECL_FUNCTION instead of DECL_SAVED_INSNS.
	(pushdecl): Likewise.
	* calls.c (expand_call): Propagate preferred_stack_boundary.
	* function.c (expand_function_start): Initialize DECL_FUNCTION
	of current_function_decl.
	* function.h (perm_function): New function.
	* integrate.c (save_for_inline_nocopy): Use DECL_FUNCTION instead of
	DECL_SAVED_INSNS.
	* print-tree.c: Include rtl.h and function.h
	* toplev.c (rest_of_compilation): Caluclate preferred_stack_boundary.
	* tree.h (saved_insns field): Rename to perm_function, all references
	updated; point to perm_function instead of function.
	(DECL_FRAME_SIZE): Use frame_size field of perm_function.
	(DECL_SAVED_INSNS): Likewise.
	* ch/Makefile.in (decl.o): Add dependancy on rtl.h and function.h
	* ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use perm_function instead of
	saved_insns.
	* ch/decl.c: Include rtl.h and function.h.
	* cp/class.c (check_field_decls): Clear DECL_FUNCTION instead of
	DECL_SAVED_INSNS.
	(build_vtbl_or_vbase_field, check_methods): Likewise.
	* cp/decl.c  (store_parm_decls): Likewise.
	(duplicate_decls): Copy DECL_FUNCTION instead of
	DECL_FRAME_SIZE and DECL_SAVED_INSNS.
	* f/Makefile.in (FUNCTION_H): New variable.
	(f/com.c): Add dependency on rtl.h and function.h.
	* f/com.c: Include function.h and rtl.h.
	(ffecom_decl_field): Use DECL_ALIGN instead of DECL_FRAME_SIZE.
	(ffecom_init): Likewise.
	(duplicate_decls): Use DECL_FUNCTION instead of DECL_SAVED_INSNS
	and DECL_FRAME_SIZE.
	* java/Makefile.in (class.o): Add dependancy on rtl.h and function.h.
	* java/class.c: Include rtl.h and function.h
	* java/java-tree.h (LABEL_PC): Use perm_function instead of saved_insns

Index: egcs/gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.379
diff -c -3 -p -r1.379 Makefile.in
*** Makefile.in	2000/02/06 03:40:45	1.379
--- Makefile.in	2000/02/07 19:53:11
*************** convert.o: convert.c $(CONFIG_H) system.
*** 1475,1481 ****
  
  tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h \
     ggc.h
! print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) ggc.h
  stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
     function.h $(EXPR_H) $(RTL_H) toplev.h ggc.h
  fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
--- 1475,1482 ----
  
  tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h \
     ggc.h
! print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) ggc.h function.h \
!    rtl.h
  stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
     function.h $(EXPR_H) $(RTL_H) toplev.h ggc.h
  fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
Index: egcs/gcc/c-decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-decl.c,v
retrieving revision 1.96
diff -c -3 -p -r1.96 c-decl.c
*** c-decl.c	2000/01/31 03:31:26	1.96
--- c-decl.c	2000/02/07 19:53:14
*************** duplicate_decls (newdecl, olddecl, diffe
*** 1935,1941 ****
  	}
        /* 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);
--- 1935,1941 ----
  	}
        /* Also preserve various other info from the definition.  */
        else if (! new_is_definition)
! 	DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
        if (! new_is_definition)
  	{
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
*************** duplicate_decls (newdecl, olddecl, diffe
*** 1944,1950 ****
  	     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);
--- 1944,1950 ----
  	     declarations into function definitions.  */
  	  if (! different_binding_level)
  	    DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
! 	  DECL_FUNCTION (newdecl) = DECL_FUNCTION (olddecl);
  	  DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
  	  if (DECL_INLINE (newdecl))
  	    DECL_ABSTRACT_ORIGIN (newdecl) = DECL_ORIGIN (olddecl);
*************** pushdecl (x)
*** 2306,2313 ****
  		      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);
--- 2306,2312 ----
  		      DECL_INLINE (x) = DECL_INLINE (oldglobal);
  		      DECL_INITIAL (x) = (current_function_decl == oldglobal
  					  ? 0 : DECL_INITIAL (oldglobal));
! 		      DECL_FUNCTION (x) = DECL_FUNCTION (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.80
diff -c -3 -p -r1.80 calls.c
*** calls.c	2000/02/07 17:39:40	1.80
--- calls.c	2000/02/07 19:53:16
*************** expand_call (exp, target, ignore)
*** 1725,1730 ****
--- 1725,1733 ----
  	fndecl = 0;
        else
  	{
+ 	  if (DECL_FUNCTION (fndecl))
+ 	    preferred_stack_boundary
+ 	      = DECL_FUNCTION (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.156
diff -c -3 -p -r1.156 function.c
*** function.c	2000/02/07 17:39:40	1.156
--- function.c	2000/02/07 19:53:18
*************** expand_function_start (subr, parms_have_
*** 5874,5879 ****
--- 5874,5887 ----
  {
    tree tem;
    rtx last_ptr = NULL_RTX;
+   struct perm_function *perm;
+ 
+   /* Initialize permanent function data.  */
+   perm = (struct perm_function *) xcalloc (1, sizeof (struct perm_function));
+   perm->preferred_stack_boundary = PREFERRED_STACK_BOUNDARY;
+   perm->function = NULL;
+ 
+   DECL_FUNCTION (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.44
diff -c -3 -p -r1.44 function.h
*** function.h	2000/02/07 17:39:40	1.44
--- function.h	2000/02/07 19:53:19
*************** struct function
*** 469,474 ****
--- 469,488 ----
    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 perm_function
+ {
+   /* Stack boundary function expect at entry.  */
+   int preferred_stack_boundary;
+ 
+   /* Used by integrate.c.  */
+   int frame_size;
+   struct function *function;
+   rtx *saved_insns;
+ };
+ 
  /* The function currently being compiled.  */
  extern struct function *cfun;
  
Index: egcs/gcc/integrate.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/integrate.c,v
retrieving revision 1.90
diff -c -3 -p -r1.90 integrate.c
*** integrate.c	2000/02/07 17:39:40	1.90
--- integrate.c	2000/02/07 19:53:19
*************** save_for_inline_nocopy (fndecl)
*** 440,446 ****
    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);
--- 440,446 ----
    cfun->inl_last_parm_insn = cfun->x_last_parm_insn;
    cfun->original_arg_vector = argvec;
    cfun->original_decl_initial = DECL_INITIAL (fndecl);
!   DECL_FUNCTION (fndecl)->function = cfun;
  
    /* Clean up.  */
    free (parmdecl_map);
Index: egcs/gcc/print-tree.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/print-tree.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 print-tree.c
*** print-tree.c	1999/12/05 02:42:10	1.21
--- print-tree.c	2000/02/07 19:53:20
*************** Boston, MA 02111-1307, USA.  */
*** 21,26 ****
--- 21,28 ----
  
  #include "config.h"
  #include "system.h"
+ #include "rtl.h"
+ #include "function.h"
  #include "tree.h"
  #include "ggc.h"
  
Index: egcs/gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.286
diff -c -3 -p -r1.286 toplev.c
*** toplev.c	2000/02/06 03:40:46	1.286
--- toplev.c	2000/02/07 19:53:21
*************** rest_of_compilation (decl)
*** 3410,3415 ****
--- 3410,3420 ----
  	     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_FUNCTION (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.120
diff -c -3 -p -r1.120 tree.h
*** tree.h	2000/01/27 20:46:26	1.120
--- tree.h	2000/02/07 19:53:22
*************** struct tree_type
*** 1139,1156 ****
  #define DECL_LIVE_RANGE_RTL(NODE) (DECL_CHECK (NODE)->decl.live_range_rtl)
  /* 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.saved_insns.r)
! /* For FUNCTION_DECL, if it is inline, holds the saved insn chain.  */
! #define DECL_SAVED_INSNS(NODE) (DECL_CHECK (NODE)->decl.saved_insns.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.frame_size.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.frame_size.f.code)
  #define DECL_SET_FUNCTION_CODE(NODE,VAL) (DECL_CHECK (NODE)->decl.frame_size.f.code = (VAL))
  /* For a FIELD_DECL, holds the size of the member as an integer.  */
! #define DECL_FIELD_SIZE(NODE) (DECL_CHECK (NODE)->decl.saved_insns.i)
  
  /* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
     Before the struct containing the FUNCTION_DECL is laid out,
--- 1139,1157 ----
  #define DECL_LIVE_RANGE_RTL(NODE) (DECL_CHECK (NODE)->decl.live_range_rtl)
  /* 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.perm_function.r)
! /* For FUNCTION_DECL, if it is known, it contains pointer to perm_function.  */
! #define DECL_FUNCTION(NODE) (DECL_CHECK (NODE)->decl.perm_function.f)
! #define DECL_SAVED_INSNS(NODE) (DECL_FUNCTION(NODE) ? DECL_FUNCTION (NODE)->function : NULL)
  /* For FUNCTION_DECL, if it is inline,
     holds the size of the stack frame, as an integer.  */
! #define DECL_FRAME_SIZE(NODE) (DECL_FUNCTION (NODE)->frame_size)
  /* 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.frame_size.f.code)
  #define DECL_SET_FUNCTION_CODE(NODE,VAL) (DECL_CHECK (NODE)->decl.frame_size.f.code = (VAL))
  /* For a FIELD_DECL, holds the size of the member as an integer.  */
! #define DECL_FIELD_SIZE(NODE) (DECL_CHECK (NODE)->decl.perm_function.i)
  
  /* The DECL_VINDEX is used for FUNCTION_DECLS in two different ways.
     Before the struct containing the FUNCTION_DECL is laid out,
*************** struct tree_decl
*** 1428,1440 ****
    struct rtx_def *rtl;	/* acts as link to register transfer language
  				   (rtl) info */
    struct rtx_def *live_range_rtl;
!   /* For FUNCTION_DECLs: points to insn that constitutes its definition
!      on the permanent obstack.  For FIELD_DECL, this is DECL_FIELD_SIZE.  */
    union {
!     struct function *f;
      struct rtx_def *r;
      HOST_WIDE_INT i;
!   } saved_insns;
    union tree_node *vindex;
    int pointer_alias_set;
    /* Points to a structure whose details depend on the language in use.  */
--- 1429,1441 ----
    struct rtx_def *rtl;	/* acts as link to register transfer language
  				   (rtl) info */
    struct rtx_def *live_range_rtl;
!   /* For FUNCTION_DECLs: points to perm_function structure.
!      For FIELD_DECL, this is DECL_FIELD_SIZE.  */
    union {
!     struct perm_function *f;
      struct rtx_def *r;
      HOST_WIDE_INT i;
!   } perm_function;
    union tree_node *vindex;
    int pointer_alias_set;
    /* Points to a structure whose details depend on the language in use.  */
Index: egcs/gcc/ch/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/Makefile.in,v
retrieving revision 1.21
diff -c -3 -p -r1.21 Makefile.in
*** Makefile.in	1999/11/01 05:35:03	1.21
--- Makefile.in	2000/02/07 19:53:22
*************** convert.o : convert.c $(CONFIG_H) $(CHIL
*** 268,274 ****
  	$(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 \
--- 268,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 \
! 	$(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/ch-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/ch-tree.h,v
retrieving revision 1.17
diff -c -3 -p -r1.17 ch-tree.h
*** ch-tree.h	2000/01/17 16:49:30	1.17
--- ch-tree.h	2000/02/07 19:53:23
*************** extern int action_nesting_level;
*** 87,93 ****
  #define ELSE_VARIANT_NAME ridpointers[(int) RID_ELSE]
  
  /* For a LABEL_DECL:  action_nesting_level of its target. */
! #define DECL_ACTION_NESTING_LEVEL(NODE) ((NODE)->decl.saved_insns.i)
  
  #define DECL_OLD_PREFIX(DECL) ((DECL)->decl.initial)
  #define DECL_NEW_PREFIX(DECL) ((DECL)->decl.result)
--- 87,93 ----
  #define ELSE_VARIANT_NAME ridpointers[(int) RID_ELSE]
  
  /* For a LABEL_DECL:  action_nesting_level of its target. */
! #define DECL_ACTION_NESTING_LEVEL(NODE) ((NODE)->decl.perm_function.i)
  
  #define DECL_OLD_PREFIX(DECL) ((DECL)->decl.initial)
  #define DECL_NEW_PREFIX(DECL) ((DECL)->decl.result)
Index: egcs/gcc/ch/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/decl.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 decl.c
*** decl.c	2000/01/17 16:49:30	1.17
--- decl.c	2000/02/07 19:53:24
*************** Boston, MA 02111-1307, USA.  */
*** 182,187 ****
--- 182,189 ----
  
  #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/cp/class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.253
diff -c -3 -p -r1.253 class.c
*** class.c	2000/02/06 04:27:53	1.253
--- class.c	2000/02/07 19:53:26
*************** check_field_decls (t, access_decls, empt
*** 3842,3848 ****
        if (type == error_mark_node)
  	continue;
  	  
!       DECL_SAVED_INSNS (x) = 0;
        DECL_FIELD_SIZE (x) = 0;
  
        /* When this goes into scope, it will be a non-local reference.  */
--- 3842,3848 ----
        if (type == error_mark_node)
  	continue;
  	  
!       DECL_FUNCTION (x) = 0;
        DECL_FIELD_SIZE (x) = 0;
  
        /* When this goes into scope, it will be a non-local reference.  */
*************** build_vtbl_or_vbase_field (name, assembl
*** 4001,4007 ****
    DECL_FIELD_CONTEXT (field) = class_type;
    DECL_CLASS_CONTEXT (field) = class_type;
    DECL_FCONTEXT (field) = fcontext;
!   DECL_SAVED_INSNS (field) = 0;
    DECL_FIELD_SIZE (field) = 0;
    DECL_ALIGN (field) = TYPE_ALIGN (type);
  
--- 4001,4007 ----
    DECL_FIELD_CONTEXT (field) = class_type;
    DECL_CLASS_CONTEXT (field) = class_type;
    DECL_FCONTEXT (field) = fcontext;
!   DECL_FUNCTION (field) = 0;
    DECL_FIELD_SIZE (field) = 0;
    DECL_ALIGN (field) = TYPE_ALIGN (type);
  
*************** check_methods (t)
*** 4203,4209 ****
  	 if the insn `r' member and the size `i' member are
  	 different sizes, as on the alpha, the larger of the two
  	 will end up with garbage in it.  */
!       DECL_SAVED_INSNS (x) = 0;
        DECL_FIELD_SIZE (x) = 0;
  
        check_for_override (x, t);
--- 4203,4209 ----
  	 if the insn `r' member and the size `i' member are
  	 different sizes, as on the alpha, the larger of the two
  	 will end up with garbage in it.  */
!       DECL_FUNCTION (x) = 0;
        DECL_FIELD_SIZE (x) = 0;
  
        check_for_override (x, t);
Index: egcs/gcc/cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.541
diff -c -3 -p -r1.541 decl.c
*** decl.c	2000/01/29 19:10:00	1.541
--- decl.c	2000/02/07 19:53:30
*************** duplicate_decls (newdecl, olddecl)
*** 3509,3518 ****
  	      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);
--- 3509,3519 ----
  	      DECL_RTL (newdecl) = DECL_RTL (olddecl);
  	    }
  	  else
! 	    DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl);
  
  	  DECL_RESULT (newdecl) = DECL_RESULT (olddecl);
! 	  DECL_FUNCTION (newdecl) = DECL_FUNCTION (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 ()
*** 13426,13432 ****
      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);
  
--- 13427,13433 ----
      storedecls (chainon (nonparms, DECL_ARGUMENTS (fndecl)));
  
    /* Initialize the RTL code for the function.  */
!   DECL_FUNCTION (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.19
diff -c -3 -p -r1.19 Makefile.in
*** Makefile.in	1999/12/30 19:44:13	1.19
--- Makefile.in	2000/02/07 19:53:33
*************** 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) $(RTL_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.74
diff -c -3 -p -r1.74 com.c
*** com.c	2000/02/06 04:30:45	1.74
--- com.c	2000/02/07 19:53:38
*************** the Free Software Foundation, 59 Temple 
*** 94,99 ****
--- 94,101 ----
  #include "output.j"  /* Must follow tree.j so TREE_CODE is defined! */
  #include "convert.j"
  #include "ggc.j"
+ #include "rtl.h"
+ #include "function.h"
  #endif	/* FFECOM_targetCURRENT == FFECOM_targetGCC */
  
  #define FFECOM_GCC_INCLUDE 1	/* Enable -I. */
*************** ffecom_decl_field (tree context, tree pr
*** 11060,11066 ****
  
    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;
  
--- 11062,11068 ----
  
    field = build_decl (FIELD_DECL, get_identifier (name), type);
    DECL_CONTEXT (field) = context;
!   DECL_ALIGN (field) = 0;
    if (prevfield != NULL_TREE)
      TREE_CHAIN (prevfield) = field;
  
*************** ffecom_init_0 ()
*** 12116,12122 ****
  						 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];
        }
--- 12118,12124 ----
  						 ffecom_tree_type[i][j]);
  	DECL_CONTEXT (ffecom_multi_fields_[i][j])
  	  = ffecom_multi_type_node_;
! 	DECL_ALIGN (ffecom_multi_fields_[i][j]) = 0;
  	TREE_CHAIN (ffecom_multi_fields_[i][j]) = field;
  	field = ffecom_multi_fields_[i][j];
        }
*************** duplicate_decls (tree newdecl, tree oldd
*** 13962,13973 ****
  	  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);
      }
  
--- 13964,13973 ----
  	  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_FUNCTION (newdecl) = DECL_FUNCTION (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.46
diff -c -3 -p -r1.46 Makefile.in
*** Makefile.in	2000/01/09 14:30:28	1.46
--- Makefile.in	2000/02/07 19:53:39
*************** check-init.o : check-init.c $(CONFIG_H) 
*** 273,279 ****
    $(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 \
--- 273,279 ----
    $(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 $(srcdir)/../rtl.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.53
diff -c -3 -p -r1.53 class.c
*** class.c	2000/01/21 20:57:00	1.53
--- class.c	2000/02/07 19:53:39
*************** The Free Software Foundation is independ
*** 35,40 ****
--- 35,42 ----
  #include "toplev.h"
  #include "output.h"
  #include "parse.h"
+ #include "rtl.h"
+ #include "function.h"
  
  static tree mangle_class_field PARAMS ((tree class));
  static tree make_method_value PARAMS ((tree));
Index: egcs/gcc/java/java-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/java-tree.h,v
retrieving revision 1.51
diff -c -3 -p -r1.51 java-tree.h
*** java-tree.h	2000/01/21 20:57:00	1.51
--- java-tree.h	2000/02/07 19:53:40
*************** struct lang_identifier
*** 394,400 ****
  #define LABEL_PENDING_CHAIN(NODE) DECL_RESULT(NODE)
  
  /* In a LABEL_DECL, the corresponding bytecode program counter. */
! #define LABEL_PC(NODE) ((NODE)->decl.saved_insns.i)
  
  /* Used during verification to mark the label has "changed". (See JVM Spec). */
  #define LABEL_CHANGED(NODE) DECL_LANG_FLAG_6(NODE)
--- 394,400 ----
  #define LABEL_PENDING_CHAIN(NODE) DECL_RESULT(NODE)
  
  /* In a LABEL_DECL, the corresponding bytecode program counter. */
! #define LABEL_PC(NODE) ((NODE)->decl.perm_function.i)
  
  /* Used during verification to mark the label has "changed". (See JVM Spec). */
  #define LABEL_CHANGED(NODE) DECL_LANG_FLAG_6(NODE)

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