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]

PATCH: Fix 7086


PR c++/7086 is a compilation-time issue.  The problem is the quadratic
behavior in fixup_var_refs.  This patch doesn't fix that problem, but
it does greatly reduce the number of calls to fixup_var_refs for the
test case in question, by observing that there is no need to do fixups
if you have just generated the RTL in question, since there will never
be anything to fix up.

It should also be possible to fixup_var_refs run in linear time, but
that's for another day.

On the test case in question, this patch improves the compilation time
from 2.5 minutes to 9 seconds.

Bootstrapped and tested on i686-pc-linux-gnu, applied on the branch.
I'll apply on the mainline as soon as I confirm that it builds there.

--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com

2003-03-23  Mark Mitchell  <mark at codesourcery dot com>

	PR c++/7086
	* c-typeck.c (c_mark_addressable): Adjust calls to
	put_var_into_stack.
	* expr.c (expand_expr): Likewise.
	* function.c (put_var_into_stack): Add rescan parameter.  Do not
	call fixup_var_refs when rescan is false.
	(gen_mem_addressof): Likewise.
	(assign_parms): Adjust calls to put_var_into_stack.
	(setjmp_protect): Likewise.
	(setjmp_protect_args): Likewise.
	* rtl.h (gen_mem_addressof): Change prototype.
	* stmt.c (expand_decl): Adjust calls to put_var_into_stack.
	* tree.h (put_var_into_stack): Change prototype.

2003-03-23  Mark Mitchell  <mark at codesourcery dot com>

	PR c++/7086
	* utils2.c: Adjust calls to put_var_into_stack.

2003-03-23  Mark Mitchell  <mark at codesourcery dot com>

	PR c++/7086
	* semantics.c (genrtl_named_return_value): Adjust calls to
	put_var_into_stack.
	* typeck.c (cxx_mark_addressable): Likewise.

Sun Mar 23 23:43:45 2003  Mark Mitchell  <mark at codesourcery dot com>

	PR c++/7086
	* com.c (ffecom_sym_transform_): Adjust calls to
	put_var_into_stack.
	(ffe_mark_addressable): Likewise.

Index: c-typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.213.2.4
diff -c -5 -p -r1.213.2.4 c-typeck.c
*** c-typeck.c	16 Mar 2003 16:43:38 -0000	1.213.2.4
--- c-typeck.c	24 Mar 2003 06:11:55 -0000
*************** c_mark_addressable (exp)
*** 3332,3342 ****
  	      }
  
  	    pedwarn ("address of register variable `%s' requested",
  		     IDENTIFIER_POINTER (DECL_NAME (x)));
  	  }
! 	put_var_into_stack (x);
  
  	/* drops in */
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  #if 0  /* poplevel deals with this now.  */
--- 3332,3342 ----
  	      }
  
  	    pedwarn ("address of register variable `%s' requested",
  		     IDENTIFIER_POINTER (DECL_NAME (x)));
  	  }
! 	put_var_into_stack (x, /*rescan=*/true);
  
  	/* drops in */
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  #if 0  /* poplevel deals with this now.  */
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.498.2.10
diff -c -5 -p -r1.498.2.10 expr.c
*** expr.c	18 Mar 2003 04:12:32 -0000	1.498.2.10
--- expr.c	24 Mar 2003 06:11:57 -0000
*************** expand_expr (exp, target, tmode, modifie
*** 6860,6870 ****
  	  find_function_data (context);
  
  	  temp = SAVE_EXPR_RTL (exp);
  	  if (temp && GET_CODE (temp) == REG)
  	    {
! 	      put_var_into_stack (exp);
  	      temp = SAVE_EXPR_RTL (exp);
  	    }
  	  if (temp == 0 || GET_CODE (temp) != MEM)
  	    abort ();
  	  return
--- 6860,6870 ----
  	  find_function_data (context);
  
  	  temp = SAVE_EXPR_RTL (exp);
  	  if (temp && GET_CODE (temp) == REG)
  	    {
! 	      put_var_into_stack (exp, /*rescan=*/true);
  	      temp = SAVE_EXPR_RTL (exp);
  	    }
  	  if (temp == 0 || GET_CODE (temp) != MEM)
  	    abort ();
  	  return
*************** expand_expr (exp, target, tmode, modifie
*** 7358,7368 ****
  	      {
  		/* If the operand is a SAVE_EXPR, we can deal with this by
  		   forcing the SAVE_EXPR into memory.  */
  		if (TREE_CODE (TREE_OPERAND (exp, 0)) == SAVE_EXPR)
  		  {
! 		    put_var_into_stack (TREE_OPERAND (exp, 0));
  		    op0 = SAVE_EXPR_RTL (TREE_OPERAND (exp, 0));
  		  }
  		else
  		  {
  		    tree nt
--- 7358,7369 ----
  	      {
  		/* If the operand is a SAVE_EXPR, we can deal with this by
  		   forcing the SAVE_EXPR into memory.  */
  		if (TREE_CODE (TREE_OPERAND (exp, 0)) == SAVE_EXPR)
  		  {
! 		    put_var_into_stack (TREE_OPERAND (exp, 0), 
! 					/*rescan=*/true);
  		    op0 = SAVE_EXPR_RTL (TREE_OPERAND (exp, 0));
  		  }
  		else
  		  {
  		    tree nt
*************** expand_expr (exp, target, tmode, modifie
*** 8918,8928 ****
  		target = assign_temp (type, 2, 0, 1);
  		/* All temp slots at this level must not conflict.  */
  		preserve_temp_slots (target);
  		SET_DECL_RTL (slot, target);
  		if (TREE_ADDRESSABLE (slot))
! 		  put_var_into_stack (slot);
  
  		/* Since SLOT is not known to the called function
  		   to belong to its stack frame, we must build an explicit
  		   cleanup.  This case occurs when we must build up a reference
  		   to pass the reference as an argument.  In this case,
--- 8919,8929 ----
  		target = assign_temp (type, 2, 0, 1);
  		/* All temp slots at this level must not conflict.  */
  		preserve_temp_slots (target);
  		SET_DECL_RTL (slot, target);
  		if (TREE_ADDRESSABLE (slot))
! 		  put_var_into_stack (slot, /*rescan=*/false);
  
  		/* Since SLOT is not known to the called function
  		   to belong to its stack frame, we must build an explicit
  		   cleanup.  This case occurs when we must build up a reference
  		   to pass the reference as an argument.  In this case,
*************** expand_expr (exp, target, tmode, modifie
*** 8957,8967 ****
  	      {
  		SET_DECL_RTL (slot, target);
  		/* If we must have an addressable slot, then make sure that
  		   the RTL that we just stored in slot is OK.  */
  		if (TREE_ADDRESSABLE (slot))
! 		  put_var_into_stack (slot);
  	      }
  	  }
  
  	exp1 = TREE_OPERAND (exp, 3) = TREE_OPERAND (exp, 1);
  	/* Mark it as expanded.  */
--- 8958,8968 ----
  	      {
  		SET_DECL_RTL (slot, target);
  		/* If we must have an addressable slot, then make sure that
  		   the RTL that we just stored in slot is OK.  */
  		if (TREE_ADDRESSABLE (slot))
! 		  put_var_into_stack (slot, /*rescan=*/true);
  	      }
  	  }
  
  	exp1 = TREE_OPERAND (exp, 3) = TREE_OPERAND (exp, 1);
  	/* Mark it as expanded.  */
*************** expand_expr (exp, target, tmode, modifie
*** 9107,9117 ****
  	    {
  	      /* If the operand is a SAVE_EXPR, we can deal with this by
  		 forcing the SAVE_EXPR into memory.  */
  	      if (TREE_CODE (TREE_OPERAND (exp, 0)) == SAVE_EXPR)
  		{
! 		  put_var_into_stack (TREE_OPERAND (exp, 0));
  		  op0 = SAVE_EXPR_RTL (TREE_OPERAND (exp, 0));
  		}
  	      else
  		{
  		  /* If this object is in a register, it can't be BLKmode.  */
--- 9108,9119 ----
  	    {
  	      /* If the operand is a SAVE_EXPR, we can deal with this by
  		 forcing the SAVE_EXPR into memory.  */
  	      if (TREE_CODE (TREE_OPERAND (exp, 0)) == SAVE_EXPR)
  		{
! 		  put_var_into_stack (TREE_OPERAND (exp, 0),
! 				      /*rescan=*/true);
  		  op0 = SAVE_EXPR_RTL (TREE_OPERAND (exp, 0));
  		}
  	      else
  		{
  		  /* If this object is in a register, it can't be BLKmode.  */
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.389.2.6
diff -c -5 -p -r1.389.2.6 function.c
*** function.c	21 Mar 2003 23:56:59 -0000	1.389.2.6
--- function.c	24 Mar 2003 06:11:59 -0000
*************** init_temp_slots ()
*** 1322,1337 ****
    temp_slot_level = 0;
    var_temp_slot_level = 0;
    target_temp_slot_level = 0;
  }
  
! /* Retroactively move an auto variable from a register to a stack slot.
!    This is done when an address-reference to the variable is seen.  */
  
  void
! put_var_into_stack (decl)
       tree decl;
  {
    rtx reg;
    enum machine_mode promoted_mode, decl_mode;
    struct function *function = 0;
    tree context;
--- 1322,1341 ----
    temp_slot_level = 0;
    var_temp_slot_level = 0;
    target_temp_slot_level = 0;
  }
  
! /* Retroactively move an auto variable from a register to a stack
!    slot.  This is done when an address-reference to the variable is
!    seen.  If RESCAN is true, all previously emitted instructions are
!    examined and modified to handle the fact that DECL is now
!    addressable.  */
  
  void
! put_var_into_stack (decl, rescan)
       tree decl;
+      bool rescan;
  {
    rtx reg;
    enum machine_mode promoted_mode, decl_mode;
    struct function *function = 0;
    tree context;
*************** put_var_into_stack (decl)
*** 1402,1412 ****
      {
        /* If this variable lives in the current function and we don't need
  	 to put things in the stack for the sake of setjmp, try to keep it
  	 in a register until we know we actually need the address.  */
        if (can_use_addressof)
! 	gen_mem_addressof (reg, decl);
        else
  	put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,
  			    decl_mode, volatilep, 0, usedp, 0);
      }
    else if (GET_CODE (reg) == CONCAT)
--- 1406,1416 ----
      {
        /* If this variable lives in the current function and we don't need
  	 to put things in the stack for the sake of setjmp, try to keep it
  	 in a register until we know we actually need the address.  */
        if (can_use_addressof)
! 	gen_mem_addressof (reg, decl, rescan);
        else
  	put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,
  			    decl_mode, volatilep, 0, usedp, 0);
      }
    else if (GET_CODE (reg) == CONCAT)
*************** put_var_into_stack (decl)
*** 1449,1459 ****
  	 Use the lower parts address as ours.  */
        XEXP (reg, 0) = XEXP (XEXP (reg, 0), 0);
        /* Prevent sharing of rtl that might lose.  */
        if (GET_CODE (XEXP (reg, 0)) == PLUS)
  	XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));
!       if (usedp)
  	{
  	  schedule_fixup_var_refs (function, reg, TREE_TYPE (decl),
  				   promoted_mode, 0);
  	  schedule_fixup_var_refs (function, lopart, part_type, part_mode, 0);
  	  schedule_fixup_var_refs (function, hipart, part_type, part_mode, 0);
--- 1453,1463 ----
  	 Use the lower parts address as ours.  */
        XEXP (reg, 0) = XEXP (XEXP (reg, 0), 0);
        /* Prevent sharing of rtl that might lose.  */
        if (GET_CODE (XEXP (reg, 0)) == PLUS)
  	XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));
!       if (usedp && rescan)
  	{
  	  schedule_fixup_var_refs (function, reg, TREE_TYPE (decl),
  				   promoted_mode, 0);
  	  schedule_fixup_var_refs (function, lopart, part_type, part_mode, 0);
  	  schedule_fixup_var_refs (function, hipart, part_type, part_mode, 0);
*************** static int cfa_offset;
*** 2889,2907 ****
  
  #ifndef ARG_POINTER_CFA_OFFSET
  #define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
  #endif
  
! /* Build up a (MEM (ADDRESSOF (REG))) rtx for a register REG that just had its
!    address taken.  DECL is the decl or SAVE_EXPR for the object stored in the
!    register, for later use if we do need to force REG into the stack.  REG is
!    overwritten by the MEM like in put_reg_into_stack.  */
  
  rtx
! gen_mem_addressof (reg, decl)
       rtx reg;
       tree decl;
  {
    rtx r = gen_rtx_ADDRESSOF (Pmode, gen_reg_rtx (GET_MODE (reg)),
  			     REGNO (reg), decl);
  
    /* Calculate this before we start messing with decl's RTL.  */
--- 2893,2915 ----
  
  #ifndef ARG_POINTER_CFA_OFFSET
  #define ARG_POINTER_CFA_OFFSET(FNDECL) FIRST_PARM_OFFSET (FNDECL)
  #endif
  
! /* Build up a (MEM (ADDRESSOF (REG))) rtx for a register REG that just
!    had its address taken.  DECL is the decl or SAVE_EXPR for the
!    object stored in the register, for later use if we do need to force
!    REG into the stack.  REG is overwritten by the MEM like in
!    put_reg_into_stack.  RESCAN is true if previously emitted
!    instructions must be rescanned and modified now that the REG has
!    been transformed.  */
  
  rtx
! gen_mem_addressof (reg, decl, rescan)
       rtx reg;
       tree decl;
+      bool rescan;
  {
    rtx r = gen_rtx_ADDRESSOF (Pmode, gen_reg_rtx (GET_MODE (reg)),
  			     REGNO (reg), decl);
  
    /* Calculate this before we start messing with decl's RTL.  */
*************** gen_mem_addressof (reg, decl)
*** 2935,2948 ****
        set_mem_alias_set (reg, set);
  
        if (DECL_P (decl) && decl_rtl == reg)
  	SET_DECL_RTL (decl, reg);
  
!       if (TREE_USED (decl) || (DECL_P (decl) && DECL_INITIAL (decl) != 0))
  	fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), reg, 0);
      }
!   else
      fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);
  
    return reg;
  }
  
--- 2943,2957 ----
        set_mem_alias_set (reg, set);
  
        if (DECL_P (decl) && decl_rtl == reg)
  	SET_DECL_RTL (decl, reg);
  
!       if (rescan 
! 	  && (TREE_USED (decl) || (DECL_P (decl) && DECL_INITIAL (decl) != 0)))
  	fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), reg, 0);
      }
!   else if (rescan)
      fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);
  
    return reg;
  }
  
*************** assign_parms (fndecl)
*** 5021,5031 ****
  		 sequences -- but it can't see the ones in the
  		 CONVERSION_INSNS, if they're not on the sequence
  		 stack.  So, we go back to that sequence, just so that
  		 the fixups will happen.  */
  	      push_to_sequence (conversion_insns);
! 	      put_var_into_stack (parm);
  	      conversion_insns = get_insns ();
  	      end_sequence ();
  	    }
  	}
        else
--- 5030,5040 ----
  		 sequences -- but it can't see the ones in the
  		 CONVERSION_INSNS, if they're not on the sequence
  		 stack.  So, we go back to that sequence, just so that
  		 the fixups will happen.  */
  	      push_to_sequence (conversion_insns);
! 	      put_var_into_stack (parm, /*rescan=*/true);
  	      conversion_insns = get_insns ();
  	      end_sequence ();
  	    }
  	}
        else
*************** setjmp_protect (block)
*** 5557,5567 ****
  	       don't put anything in them.  */
  	    NON_SAVING_SETJMP
  	    ||
  #endif
  	    ! DECL_REGISTER (decl)))
!       put_var_into_stack (decl);
    for (sub = BLOCK_SUBBLOCKS (block); sub; sub = TREE_CHAIN (sub))
      setjmp_protect (sub);
  }
  
  /* Like the previous function, but for args instead of local variables.  */
--- 5566,5576 ----
  	       don't put anything in them.  */
  	    NON_SAVING_SETJMP
  	    ||
  #endif
  	    ! DECL_REGISTER (decl)))
!       put_var_into_stack (decl, /*rescan=*/true);
    for (sub = BLOCK_SUBBLOCKS (block); sub; sub = TREE_CHAIN (sub))
      setjmp_protect (sub);
  }
  
  /* Like the previous function, but for args instead of local variables.  */
*************** setjmp_protect_args ()
*** 5584,5594 ****
  #ifdef NON_SAVING_SETJMP
  	    NON_SAVING_SETJMP
  	    ||
  #endif
  	    ! DECL_REGISTER (decl)))
!       put_var_into_stack (decl);
  }
  
  /* Return the context-pointer register corresponding to DECL,
     or 0 if it does not need one.  */
  
--- 5593,5603 ----
  #ifdef NON_SAVING_SETJMP
  	    NON_SAVING_SETJMP
  	    ||
  #endif
  	    ! DECL_REGISTER (decl)))
!       put_var_into_stack (decl, /*rescan=*/true);
  }
  
  /* Return the context-pointer register corresponding to DECL,
     or 0 if it does not need one.  */
  
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.375.2.2
diff -c -5 -p -r1.375.2.2 rtl.h
*** rtl.h	23 Mar 2003 20:17:19 -0000	1.375.2.2
--- rtl.h	24 Mar 2003 06:11:59 -0000
*************** extern rtx simplify_gen_subreg		PARAMS (
*** 1552,1562 ****
  extern rtx simplify_replace_rtx		PARAMS ((rtx, rtx, rtx));
  extern rtx simplify_rtx			PARAMS ((rtx));
  extern rtx avoid_constant_pool_reference PARAMS ((rtx));
  
  /* In function.c  */
! extern rtx gen_mem_addressof		PARAMS ((rtx, tree));
  
  /* In regclass.c  */
  extern enum machine_mode choose_hard_reg_mode PARAMS ((unsigned int,
  						       unsigned int));
  
--- 1552,1562 ----
  extern rtx simplify_replace_rtx		PARAMS ((rtx, rtx, rtx));
  extern rtx simplify_rtx			PARAMS ((rtx));
  extern rtx avoid_constant_pool_reference PARAMS ((rtx));
  
  /* In function.c  */
! extern rtx gen_mem_addressof		PARAMS ((rtx, tree, bool));
  
  /* In regclass.c  */
  extern enum machine_mode choose_hard_reg_mode PARAMS ((unsigned int,
  						       unsigned int));
  
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.276.2.7
diff -c -5 -p -r1.276.2.7 stmt.c
*** stmt.c	21 Mar 2003 23:57:00 -0000	1.276.2.7
--- stmt.c	24 Mar 2003 06:12:00 -0000
*************** expand_decl (decl)
*** 3947,3957 ****
  
        maybe_set_unchanging (DECL_RTL (decl), decl);
  
        /* If something wants our address, try to use ADDRESSOF.  */
        if (TREE_ADDRESSABLE (decl))
! 	put_var_into_stack (decl);
      }
  
    else if (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST
  	   && ! (flag_stack_check && ! STACK_CHECK_BUILTIN
  		 && 0 < compare_tree_int (DECL_SIZE_UNIT (decl),
--- 3947,3957 ----
  
        maybe_set_unchanging (DECL_RTL (decl), decl);
  
        /* If something wants our address, try to use ADDRESSOF.  */
        if (TREE_ADDRESSABLE (decl))
! 	put_var_into_stack (decl, /*rescan=*/false);
      }
  
    else if (TREE_CODE (DECL_SIZE_UNIT (decl)) == INTEGER_CST
  	   && ! (flag_stack_check && ! STACK_CHECK_BUILTIN
  		 && 0 < compare_tree_int (DECL_SIZE_UNIT (decl),
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.367.2.2
diff -c -5 -p -r1.367.2.2 tree.h
*** tree.h	6 Mar 2003 23:35:03 -0000	1.367.2.2
--- tree.h	24 Mar 2003 06:12:01 -0000
*************** extern void expand_main_function	PARAMS 
*** 2975,2985 ****
  extern void init_dummy_function_start	PARAMS ((void));
  extern void expand_dummy_function_end	PARAMS ((void));
  extern void init_function_for_compilation	PARAMS ((void));
  extern void init_function_start		PARAMS ((tree, const char *, int));
  extern void assign_parms		PARAMS ((tree));
! extern void put_var_into_stack		PARAMS ((tree));
  extern void flush_addressof		PARAMS ((tree));
  extern void uninitialized_vars_warning	PARAMS ((tree));
  extern void setjmp_args_warning		PARAMS ((void));
  extern void mark_all_temps_used		PARAMS ((void));
  extern void init_temp_slots		PARAMS ((void));
--- 2975,2985 ----
  extern void init_dummy_function_start	PARAMS ((void));
  extern void expand_dummy_function_end	PARAMS ((void));
  extern void init_function_for_compilation	PARAMS ((void));
  extern void init_function_start		PARAMS ((tree, const char *, int));
  extern void assign_parms		PARAMS ((tree));
! extern void put_var_into_stack		PARAMS ((tree, bool));
  extern void flush_addressof		PARAMS ((tree));
  extern void uninitialized_vars_warning	PARAMS ((tree));
  extern void setjmp_args_warning		PARAMS ((void));
  extern void mark_all_temps_used		PARAMS ((void));
  extern void init_temp_slots		PARAMS ((void));
Index: ada/utils2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils2.c,v
retrieving revision 1.11
diff -c -5 -p -r1.11 utils2.c
*** ada/utils2.c	23 Oct 2002 07:33:34 -0000	1.11
--- ada/utils2.c	24 Mar 2003 06:12:03 -0000
*************** gnat_mark_addressable (expr_node)
*** 2034,2044 ****
  	return true;
  
        case VAR_DECL:
        case PARM_DECL:
        case RESULT_DECL:
! 	put_var_into_stack (expr_node);
  	TREE_ADDRESSABLE (expr_node) = 1;
  	return true;
  
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (expr_node) = 1;
--- 2034,2044 ----
  	return true;
  
        case VAR_DECL:
        case PARM_DECL:
        case RESULT_DECL:
! 	put_var_into_stack (expr_node, /*rescan=*/true);
  	TREE_ADDRESSABLE (expr_node) = 1;
  	return true;
  
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (expr_node) = 1;
Index: cp/semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.282.4.1
diff -c -5 -p -r1.282.4.1 semantics.c
*** cp/semantics.c	23 Jan 2003 00:31:54 -0000	1.282.4.1
--- cp/semantics.c	24 Mar 2003 06:12:03 -0000
*************** genrtl_named_return_value ()
*** 1027,1037 ****
  	 SImode but the DECL_RTL for the DECL_RESULT has DImode.  So,
  	 here, we use the mode the back-end has already assigned for
  	 the return value.  */
        SET_DECL_RTL (decl, gen_reg_rtx (GET_MODE (DECL_RTL (decl))));
        if (TREE_ADDRESSABLE (decl))
! 	put_var_into_stack (decl);
      }
  
    emit_local_var (decl);
  }
  
--- 1027,1037 ----
  	 SImode but the DECL_RTL for the DECL_RESULT has DImode.  So,
  	 here, we use the mode the back-end has already assigned for
  	 the return value.  */
        SET_DECL_RTL (decl, gen_reg_rtx (GET_MODE (DECL_RTL (decl))));
        if (TREE_ADDRESSABLE (decl))
! 	put_var_into_stack (decl, /*rescan=*/true);
      }
  
    emit_local_var (decl);
  }
  
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.436.2.4
diff -c -5 -p -r1.436.2.4 typeck.c
*** cp/typeck.c	18 Mar 2003 04:12:40 -0000	1.436.2.4
--- cp/typeck.c	24 Mar 2003 06:12:05 -0000
*************** cxx_mark_addressable (exp)
*** 4566,4576 ****
  	if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
  	    && !DECL_ARTIFICIAL (x) && extra_warnings)
  	  warning ("address requested for `%D', which is declared `register'",
  		      x);
  	TREE_ADDRESSABLE (x) = 1;
! 	put_var_into_stack (x);
  	return true;
  
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  	TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
--- 4566,4576 ----
  	if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
  	    && !DECL_ARTIFICIAL (x) && extra_warnings)
  	  warning ("address requested for `%D', which is declared `register'",
  		      x);
  	TREE_ADDRESSABLE (x) = 1;
! 	put_var_into_stack (x, /*rescan=*/true);
  	return true;
  
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  	TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
Index: f/com.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/com.c,v
retrieving revision 1.182.4.1
diff -c -5 -p -r1.182.4.1 com.c
*** f/com.c	22 Mar 2003 15:24:51 -0000	1.182.4.1
--- f/com.c	24 Mar 2003 06:12:07 -0000
*************** ffecom_sym_transform_ (ffesymbol s)
*** 7443,7453 ****
  
  		et = ffestorag_hook (est);
  		assert (et != NULL_TREE);
  
  		if (! TREE_STATIC (et))
! 		  put_var_into_stack (et);
  
  		offset = ffestorag_modulo (est)
  		  + ffestorag_offset (ffesymbol_storage (s))
  		  - ffestorag_offset (est);
  
--- 7443,7453 ----
  
  		et = ffestorag_hook (est);
  		assert (et != NULL_TREE);
  
  		if (! TREE_STATIC (et))
! 		  put_var_into_stack (et, /*rescan=*/true);
  
  		offset = ffestorag_modulo (est)
  		  + ffestorag_offset (ffesymbol_storage (s))
  		  - ffestorag_offset (est);
  
*************** ffe_mark_addressable (exp)
*** 14293,14303 ****
  		assert ("address of global register var requested" == NULL);
  		return false;
  	      }
  	    assert ("address of register var requested" == NULL);
  	  }
! 	put_var_into_stack (x);
  
  	/* drops in */
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  #if 0				/* poplevel deals with this now.  */
--- 14293,14303 ----
  		assert ("address of global register var requested" == NULL);
  		return false;
  	      }
  	    assert ("address of register var requested" == NULL);
  	  }
! 	put_var_into_stack (x, /*rescan=*/true);
  
  	/* drops in */
        case FUNCTION_DECL:
  	TREE_ADDRESSABLE (x) = 1;
  #if 0				/* poplevel deals with this now.  */


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