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] Speedup handling of temp slot lists


Hello,

the list of temp slots is traversed after every assignment;
on huge functions (lot of assignments + lot of temporaries)
this leads to quadratic behavior.

This patch makes the problem a bit less noticeable, by splitting the
list into list of unused temporary slots and lists of slots by their
level.  On the following testcase, it decreases time of -O0 compilation
about 10 times.

Obviously it is not the best fix; a completely new stack slot allocation
mechanism using the liveness information is needed now that tree-ssa was
merged to mainline, and all temporaries are moved to the functions
topmost level.

#define ONE_LOOP \
  { int i, j; \
  for (i = 0; i < i_last; i++) \
    for (j = 0; j < j_last; j++) { \
      array[i][j] = barray[i][j] * barray[j][i]; \
      sum += array[j][i]; \
    } \
  i_last = function(sum, array, &j_last); \
  }

#define L2 \
  ONE_LOOP \
  ONE_LOOP

#define L16 L2 L2 L2 L2 L2 L2 L2 L2
#define L128 L16 L16 L16 L16 L16 L16 L16 L16
#define L1024 L128 L128 L128 L128 L128 L128 L128 L128

extern int function (int, int **, int *);

int f(int i_last, int j_last, int **array, int **barray)
{
  int sum = 0;

  L1024
  L1024
  L1024

  return sum + i_last + j_last;
}

Bootstrapped & regtested on i686.

Zdenek

	* function.c (struct temp_slot): Add new field prev.
	(free_after_compilation, init_temp_slots): Free new fields.
	(cut_slot_from_list, insert_slot_to_list,
	temp_slots_at_level, max_slot_level, move_slot_to_level,
	make_slot_available): New functions.
	(assign_stack_temp_for_type, combine_temp_slots,
	find_temp_slot_from_address, preserve_temp_slots,
	preserve_rtl_expr_result, free_temp_slots,
	free_temps_for_rtl_expr, pop_temp_slots): Work with
	the new structure of lists.
	(mark_all_temps_used): Removed.
	* function.h (struct function): Field x_temp_slots
	replaced by x_used_temp_slots and x_avail_temp_slots.
	(temp_slots): Replaced by ...
	(used_temp_slots, avail_temp_slots): New.
	* tree.h (mark_all_temps_used): Declaration removed.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.516
diff -c -3 -p -r1.516 function.c
*** function.c	13 May 2004 06:39:39 -0000	1.516
--- function.c	13 May 2004 20:54:49 -0000
*************** struct temp_slot GTY(())
*** 168,173 ****
--- 168,176 ----
  {
    /* Points to next temporary slot.  */
    struct temp_slot *next;
+   /* Points to previous temporary slot.  */
+   struct temp_slot *prev;
+ 
    /* The rtx to used to reference the slot.  */
    rtx slot;
    /* The rtx used to represent the address if not the address of the
*************** free_after_compilation (struct function 
*** 427,433 ****
    f->varasm = NULL;
    f->machine = NULL;
  
!   f->x_temp_slots = NULL;
    f->arg_offset_rtx = NULL;
    f->return_rtx = NULL;
    f->internal_arg_pointer = NULL;
--- 430,437 ----
    f->varasm = NULL;
    f->machine = NULL;
  
!   f->x_avail_temp_slots = NULL;
!   f->x_used_temp_slots = NULL;
    f->arg_offset_rtx = NULL;
    f->return_rtx = NULL;
    f->internal_arg_pointer = NULL;
*************** assign_stack_local (enum machine_mode mo
*** 605,610 ****
--- 609,690 ----
  {
    return assign_stack_local_1 (mode, size, align, cfun);
  }
+ 
+ 
+ /* Removes temporary slot TEMP from LIST.  */
+ 
+ static void
+ cut_slot_from_list (struct temp_slot *temp, struct temp_slot **list)
+ {
+   if (temp->next)
+     temp->next->prev = temp->prev;
+   if (temp->prev)
+     temp->prev->next = temp->next;
+   else
+     *list = temp->next;
+ 
+   temp->prev = temp->next = NULL;
+ }
+ 
+ /* Inserts temporary slot TEMP to LIST.  */
+ 
+ static void
+ insert_slot_to_list (struct temp_slot *temp, struct temp_slot **list)
+ {
+   temp->next = *list;
+   if (*list)
+     (*list)->prev = temp;
+   temp->prev = NULL;
+   *list = temp;
+ }
+ 
+ /* Returns the list of used temp slots at LEVEL.  */
+ 
+ static struct temp_slot **
+ temp_slots_at_level (int level)
+ {
+   level++;
+ 
+   if (!used_temp_slots)
+     VARRAY_GENERIC_PTR_INIT (used_temp_slots, 3, "used_temp_slots");
+ 
+   while (level >= (int) VARRAY_ACTIVE_SIZE (used_temp_slots))
+     VARRAY_PUSH_GENERIC_PTR (used_temp_slots, NULL);
+ 
+   return (struct temp_slot **) &VARRAY_GENERIC_PTR (used_temp_slots, level);
+ }
+ 
+ /* Returns the maximal temporary slot level.  */
+ 
+ static int
+ max_slot_level (void)
+ {
+   if (!used_temp_slots)
+     return -1;
+ 
+   return VARRAY_ACTIVE_SIZE (used_temp_slots) - 1;
+ }
+ 
+ /* Moves temporary slot TEMP to LEVEL.  */
+ 
+ static void
+ move_slot_to_level (struct temp_slot *temp, int level)
+ {
+   cut_slot_from_list (temp, temp_slots_at_level (temp->level));
+   insert_slot_to_list (temp, temp_slots_at_level (level));
+   temp->level = level;
+ }
+ 
+ /* Make temporary slot TEMP available.  */
+ 
+ static void
+ make_slot_available (struct temp_slot *temp)
+ {
+   cut_slot_from_list (temp, temp_slots_at_level (temp->level));
+   insert_slot_to_list (temp, &avail_temp_slots);
+   temp->in_use = 0;
+   temp->level = -1;
+ }
  
  /* Allocate a temporary stack slot and record it for possible later
     reuse.
*************** assign_stack_temp_for_type (enum machine
*** 628,634 ****
  			    tree type)
  {
    unsigned int align;
!   struct temp_slot *p, *best_p = 0;
    rtx slot;
  
    /* If SIZE is -1 it means that somebody tried to allocate a temporary
--- 708,714 ----
  			    tree type)
  {
    unsigned int align;
!   struct temp_slot *p, *best_p = 0, *selected = NULL, **pp;
    rtx slot;
  
    /* If SIZE is -1 it means that somebody tried to allocate a temporary
*************** assign_stack_temp_for_type (enum machine
*** 650,673 ****
    /* Try to find an available, already-allocated temporary of the proper
       mode which meets the size and alignment requirements.  Choose the
       smallest one with the closest alignment.  */
!   for (p = temp_slots; p; p = p->next)
!     if (p->align >= align && p->size >= size && GET_MODE (p->slot) == mode
! 	&& ! p->in_use
! 	&& objects_must_conflict_p (p->type, type)
! 	&& (best_p == 0 || best_p->size > p->size
! 	    || (best_p->size == p->size && best_p->align > p->align)))
!       {
! 	if (p->align == align && p->size == size)
! 	  {
! 	    best_p = 0;
! 	    break;
! 	  }
! 	best_p = p;
!       }
  
    /* Make our best, if any, the one to use.  */
    if (best_p)
      {
        /* If there are enough aligned bytes left over, make them into a new
  	 temp_slot so that the extra bytes don't get wasted.  Do this only
  	 for BLKmode slots, so that we can be sure of the alignment.  */
--- 730,759 ----
    /* Try to find an available, already-allocated temporary of the proper
       mode which meets the size and alignment requirements.  Choose the
       smallest one with the closest alignment.  */
!   for (p = avail_temp_slots; p; p = p->next)
!     {
!       if (p->align >= align && p->size >= size && GET_MODE (p->slot) == mode
! 	  && objects_must_conflict_p (p->type, type)
! 	  && (best_p == 0 || best_p->size > p->size
! 	      || (best_p->size == p->size && best_p->align > p->align)))
! 	{
! 	  if (p->align == align && p->size == size)
! 	    {
! 	      selected = p;
! 	      cut_slot_from_list (selected, &avail_temp_slots);
! 	      best_p = 0;
! 	      break;
! 	    }
! 	  best_p = p;
! 	}
!     }
  
    /* Make our best, if any, the one to use.  */
    if (best_p)
      {
+       selected = best_p;
+       cut_slot_from_list (selected, &avail_temp_slots);
+ 
        /* If there are enough aligned bytes left over, make them into a new
  	 temp_slot so that the extra bytes don't get wasted.  Do this only
  	 for BLKmode slots, so that we can be sure of the alignment.  */
*************** assign_stack_temp_for_type (enum machine
*** 690,697 ****
  	      p->address = 0;
  	      p->rtl_expr = 0;
  	      p->type = best_p->type;
! 	      p->next = temp_slots;
! 	      temp_slots = p;
  
  	      stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, p->slot,
  						   stack_slot_list);
--- 776,782 ----
  	      p->address = 0;
  	      p->rtl_expr = 0;
  	      p->type = best_p->type;
! 	      insert_slot_to_list (p, &avail_temp_slots);
  
  	      stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, p->slot,
  						   stack_slot_list);
*************** assign_stack_temp_for_type (enum machine
*** 700,711 ****
  	      best_p->full_size = rounded_size;
  	    }
  	}
- 
-       p = best_p;
      }
  
    /* If we still didn't find one, make a new temporary.  */
!   if (p == 0)
      {
        HOST_WIDE_INT frame_offset_old = frame_offset;
  
--- 785,794 ----
  	      best_p->full_size = rounded_size;
  	    }
  	}
      }
  
    /* If we still didn't find one, make a new temporary.  */
!   if (selected == 0)
      {
        HOST_WIDE_INT frame_offset_old = frame_offset;
  
*************** assign_stack_temp_for_type (enum machine
*** 750,759 ****
        p->full_size = frame_offset - frame_offset_old;
  #endif
        p->address = 0;
!       p->next = temp_slots;
!       temp_slots = p;
      }
  
    p->in_use = 1;
    p->addr_taken = 0;
    p->rtl_expr = seq_rtl_expr;
--- 833,843 ----
        p->full_size = frame_offset - frame_offset_old;
  #endif
        p->address = 0;
! 
!       selected = p;
      }
  
+   p = selected;
    p->in_use = 1;
    p->addr_taken = 0;
    p->rtl_expr = seq_rtl_expr;
*************** assign_stack_temp_for_type (enum machine
*** 775,780 ****
--- 859,866 ----
        p->keep = keep;
      }
  
+   pp = temp_slots_at_level (p->level);
+   insert_slot_to_list (p, pp);
  
    /* Create a new MEM rtx to avoid clobbering MEM flags of old slots.  */
    slot = gen_rtx_MEM (mode, XEXP (p->slot, 0));
*************** assign_temp (tree type_or_decl, int keep
*** 888,895 ****
  void
  combine_temp_slots (void)
  {
!   struct temp_slot *p, *q;
!   struct temp_slot *prev_p, *prev_q;
    int num_slots;
  
    /* We can't combine slots, because the information about which slot
--- 974,980 ----
  void
  combine_temp_slots (void)
  {
!   struct temp_slot *p, *q, *next, *next_q;
    int num_slots;
  
    /* We can't combine slots, because the information about which slot
*************** combine_temp_slots (void)
*** 900,951 ****
    /* If there are a lot of temp slots, don't do anything unless
       high levels of optimization.  */
    if (! flag_expensive_optimizations)
!     for (p = temp_slots, num_slots = 0; p; p = p->next, num_slots++)
        if (num_slots > 100 || (num_slots > 10 && optimize == 0))
  	return;
  
!   for (p = temp_slots, prev_p = 0; p; p = prev_p ? prev_p->next : temp_slots)
      {
        int delete_p = 0;
  
!       if (! p->in_use && GET_MODE (p->slot) == BLKmode)
! 	for (q = p->next, prev_q = p; q; q = prev_q->next)
! 	  {
! 	    int delete_q = 0;
! 	    if (! q->in_use && GET_MODE (q->slot) == BLKmode)
! 	      {
! 		if (p->base_offset + p->full_size == q->base_offset)
! 		  {
! 		    /* Q comes after P; combine Q into P.  */
! 		    p->size += q->size;
! 		    p->full_size += q->full_size;
! 		    delete_q = 1;
! 		  }
! 		else if (q->base_offset + q->full_size == p->base_offset)
! 		  {
! 		    /* P comes after Q; combine P into Q.  */
! 		    q->size += p->size;
! 		    q->full_size += p->full_size;
! 		    delete_p = 1;
! 		    break;
! 		  }
! 	      }
! 	    /* Either delete Q or advance past it.  */
! 	    if (delete_q)
! 	      prev_q->next = q->next;
! 	    else
! 	      prev_q = q;
! 	  }
!       /* Either delete P or advance past it.  */
!       if (delete_p)
  	{
! 	  if (prev_p)
! 	    prev_p->next = p->next;
! 	  else
! 	    temp_slots = p->next;
  	}
!       else
! 	prev_p = p;
      }
  }
  
--- 985,1034 ----
    /* If there are a lot of temp slots, don't do anything unless
       high levels of optimization.  */
    if (! flag_expensive_optimizations)
!     for (p = avail_temp_slots, num_slots = 0; p; p = p->next, num_slots++)
        if (num_slots > 100 || (num_slots > 10 && optimize == 0))
  	return;
  
!   for (p = avail_temp_slots; p; p = next)
      {
        int delete_p = 0;
  
!       next = p->next;
! 
!       if (GET_MODE (p->slot) != BLKmode)
! 	continue;
! 
!       for (q = p->next; q; q = next_q)
  	{
!        	  int delete_q = 0;
! 
! 	  next_q = q->next;
! 
! 	  if (GET_MODE (q->slot) != BLKmode)
! 	    continue;
! 
! 	  if (p->base_offset + p->full_size == q->base_offset)
! 	    {
! 	      /* Q comes after P; combine Q into P.  */
! 	      p->size += q->size;
! 	      p->full_size += q->full_size;
! 	      delete_q = 1;
! 	    }
! 	  else if (q->base_offset + q->full_size == p->base_offset)
! 	    {
! 	      /* P comes after Q; combine P into Q.  */
! 	      q->size += p->size;
! 	      q->full_size += p->full_size;
! 	      delete_p = 1;
! 	      break;
! 	    }
! 	  if (delete_q)
! 	    cut_slot_from_list (q, &avail_temp_slots);
  	}
! 
!       /* Either delete P or advance past it.  */
!       if (delete_p)
! 	cut_slot_from_list (p, &avail_temp_slots);
      }
  }
  
*************** find_temp_slot_from_address (rtx x)
*** 956,981 ****
  {
    struct temp_slot *p;
    rtx next;
  
!   for (p = temp_slots; p; p = p->next)
!     {
!       if (! p->in_use)
! 	continue;
! 
!       else if (XEXP (p->slot, 0) == x
! 	       || p->address == x
! 	       || (GET_CODE (x) == PLUS
! 		   && XEXP (x, 0) == virtual_stack_vars_rtx
! 		   && GET_CODE (XEXP (x, 1)) == CONST_INT
! 		   && INTVAL (XEXP (x, 1)) >= p->base_offset
! 		   && INTVAL (XEXP (x, 1)) < p->base_offset + p->full_size))
! 	return p;
! 
!       else if (p->address != 0 && GET_CODE (p->address) == EXPR_LIST)
! 	for (next = p->address; next; next = XEXP (next, 1))
! 	  if (XEXP (next, 0) == x)
! 	    return p;
!     }
  
    /* If we have a sum involving a register, see if it points to a temp
       slot.  */
--- 1039,1063 ----
  {
    struct temp_slot *p;
    rtx next;
+   int i;
  
!   for (i = max_slot_level (); i >= 0; i--)
!     for (p = *temp_slots_at_level (i); p; p = p->next)
!       {
! 	if (XEXP (p->slot, 0) == x
! 	    || p->address == x
! 	    || (GET_CODE (x) == PLUS
! 		&& XEXP (x, 0) == virtual_stack_vars_rtx
! 		&& GET_CODE (XEXP (x, 1)) == CONST_INT
! 		&& INTVAL (XEXP (x, 1)) >= p->base_offset
! 		&& INTVAL (XEXP (x, 1)) < p->base_offset + p->full_size))
! 	  return p;
! 
! 	else if (p->address != 0 && GET_CODE (p->address) == EXPR_LIST)
! 	  for (next = p->address; next; next = XEXP (next, 1))
! 	    if (XEXP (next, 0) == x)
! 	      return p;
!       }
  
    /* If we have a sum involving a register, see if it points to a temp
       slot.  */
*************** mark_temp_addr_taken (rtx x)
*** 1078,1092 ****
  void
  preserve_temp_slots (rtx x)
  {
!   struct temp_slot *p = 0;
  
    /* If there is no result, we still might have some objects whose address
       were taken, so we need to make sure they stay around.  */
    if (x == 0)
      {
!       for (p = temp_slots; p; p = p->next)
! 	if (p->in_use && p->level == temp_slot_level && p->addr_taken)
! 	  p->level--;
  
        return;
      }
--- 1160,1178 ----
  void
  preserve_temp_slots (rtx x)
  {
!   struct temp_slot *p = 0, *next;
  
    /* If there is no result, we still might have some objects whose address
       were taken, so we need to make sure they stay around.  */
    if (x == 0)
      {
!       for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
! 	{
! 	  next = p->next;
! 
! 	  if (p->addr_taken)
! 	    move_slot_to_level (p, temp_slot_level - 1);
! 	}
  
        return;
      }
*************** preserve_temp_slots (rtx x)
*** 1103,1111 ****
       taken.  */
    if (p == 0 && (GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))))
      {
!       for (p = temp_slots; p; p = p->next)
! 	if (p->in_use && p->level == temp_slot_level && p->addr_taken)
! 	  p->level--;
  
        return;
      }
--- 1189,1201 ----
       taken.  */
    if (p == 0 && (GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0))))
      {
!       for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
! 	{
! 	  next = p->next;
! 
! 	  if (p->addr_taken)
! 	    move_slot_to_level (p, temp_slot_level - 1);
! 	}
  
        return;
      }
*************** preserve_temp_slots (rtx x)
*** 1122,1141 ****
  
        if (p->level == temp_slot_level)
  	{
! 	  for (q = temp_slots; q; q = q->next)
! 	    if (q != p && q->addr_taken && q->level == p->level)
! 	      q->level--;
  
! 	  p->level--;
  	  p->addr_taken = 0;
  	}
        return;
      }
  
    /* Otherwise, preserve all non-kept slots at this level.  */
!   for (p = temp_slots; p; p = p->next)
!     if (p->in_use && p->level == temp_slot_level && ! p->keep)
!       p->level--;
  }
  
  /* X is the result of an RTL_EXPR.  If it is a temporary slot associated
--- 1212,1239 ----
  
        if (p->level == temp_slot_level)
  	{
! 	  for (q = *temp_slots_at_level (temp_slot_level); q; q = next)
! 	    {
! 	      next = q->next;
! 
! 	      if (p != q && q->addr_taken)
! 		move_slot_to_level (q, temp_slot_level - 1);
! 	    }
  
! 	  move_slot_to_level (p, temp_slot_level - 1);
  	  p->addr_taken = 0;
  	}
        return;
      }
  
    /* Otherwise, preserve all non-kept slots at this level.  */
!   for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
!     {
!       next = p->next;
! 
!       if (!p->keep)
! 	move_slot_to_level (p, temp_slot_level - 1);
!     }
  }
  
  /* X is the result of an RTL_EXPR.  If it is a temporary slot associated
*************** preserve_rtl_expr_result (rtx x)
*** 1158,1164 ****
    p = find_temp_slot_from_address (XEXP (x, 0));
    if (p != 0)
      {
!       p->level = MIN (p->level, temp_slot_level);
        p->rtl_expr = 0;
      }
  
--- 1256,1262 ----
    p = find_temp_slot_from_address (XEXP (x, 0));
    if (p != 0)
      {
!       move_slot_to_level (p, MIN (p->level, temp_slot_level));
        p->rtl_expr = 0;
      }
  
*************** preserve_rtl_expr_result (rtx x)
*** 1175,1186 ****
  void
  free_temp_slots (void)
  {
!   struct temp_slot *p;
  
!   for (p = temp_slots; p; p = p->next)
!     if (p->in_use && p->level == temp_slot_level && ! p->keep
! 	&& p->rtl_expr == 0)
!       p->in_use = 0;
  
    combine_temp_slots ();
  }
--- 1273,1287 ----
  void
  free_temp_slots (void)
  {
!   struct temp_slot *p, *next;
! 
!   for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
!     {
!       next = p->next;
  
!       if (!p->keep && p->rtl_expr == 0)
! 	make_slot_available (p);
!     }
  
    combine_temp_slots ();
  }
*************** free_temp_slots (void)
*** 1190,1226 ****
  void
  free_temps_for_rtl_expr (tree t)
  {
!   struct temp_slot *p;
! 
!   for (p = temp_slots; p; p = p->next)
!     if (p->rtl_expr == t)
!       {
! 	/* If this slot is below the current TEMP_SLOT_LEVEL, then it
! 	   needs to be preserved.  This can happen if a temporary in
! 	   the RTL_EXPR was addressed; preserve_temp_slots will move
! 	   the temporary into a higher level.  */
! 	if (temp_slot_level <= p->level)
! 	  p->in_use = 0;
! 	else
! 	  p->rtl_expr = NULL_TREE;
!       }
! 
!   combine_temp_slots ();
! }
! 
! /* Mark all temporaries ever allocated in this function as not suitable
!    for reuse until the current level is exited.  */
! 
! void
! mark_all_temps_used (void)
! {
!   struct temp_slot *p;
  
!   for (p = temp_slots; p; p = p->next)
      {
!       p->in_use = p->keep = 1;
!       p->level = MIN (p->level, temp_slot_level);
      }
  }
  
  /* Push deeper into the nesting level for stack temporaries.  */
--- 1291,1316 ----
  void
  free_temps_for_rtl_expr (tree t)
  {
!   struct temp_slot *p, *next;
  
!   for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
      {
!       next = p->next;
! 
!       if (p->rtl_expr == t)
! 	{
! 	  /* If this slot is below the current TEMP_SLOT_LEVEL, then it
! 	     needs to be preserved.  This can happen if a temporary in
! 	     the RTL_EXPR was addressed; preserve_temp_slots will move
! 	     the temporary into a higher level.  */
! 	  if (temp_slot_level <= p->level)
! 	    make_slot_available (p);
! 	  else
! 	    p->rtl_expr = NULL_TREE;
! 	}
      }
+ 
+   combine_temp_slots ();
  }
  
  /* Push deeper into the nesting level for stack temporaries.  */
*************** push_temp_slots (void)
*** 1237,1247 ****
  void
  pop_temp_slots (void)
  {
!   struct temp_slot *p;
  
!   for (p = temp_slots; p; p = p->next)
!     if (p->in_use && p->level == temp_slot_level && p->rtl_expr == 0)
!       p->in_use = 0;
  
    combine_temp_slots ();
  
--- 1327,1341 ----
  void
  pop_temp_slots (void)
  {
!   struct temp_slot *p, *next;
  
!   for (p = *temp_slots_at_level (temp_slot_level); p; p = next)
!     {
!       next = p->next;
! 
!       if (p->rtl_expr == 0)
! 	make_slot_available (p);
!     }
  
    combine_temp_slots ();
  
*************** void
*** 1254,1260 ****
  init_temp_slots (void)
  {
    /* We have not allocated any temporaries yet.  */
!   temp_slots = 0;
    temp_slot_level = 0;
    var_temp_slot_level = 0;
    target_temp_slot_level = 0;
--- 1348,1355 ----
  init_temp_slots (void)
  {
    /* We have not allocated any temporaries yet.  */
!   avail_temp_slots = 0;
!   used_temp_slots = 0;
    temp_slot_level = 0;
    var_temp_slot_level = 0;
    target_temp_slot_level = 0;
Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.114
diff -c -3 -p -r1.114 function.h
*** function.h	13 May 2004 06:39:40 -0000	1.114
--- function.h	13 May 2004 20:54:49 -0000
*************** struct function GTY(())
*** 322,329 ****
       element in this vector is one less than MAX_PARM_REG, above.  */
    rtx * GTY ((length ("%h.x_max_parm_reg"))) x_parm_reg_stack_loc;
  
!   /* List of all temporaries allocated, both available and in use.  */
!   struct temp_slot *x_temp_slots;
  
    /* Current nesting level for temporaries.  */
    int x_temp_slot_level;
--- 322,332 ----
       element in this vector is one less than MAX_PARM_REG, above.  */
    rtx * GTY ((length ("%h.x_max_parm_reg"))) x_parm_reg_stack_loc;
  
!   /* List of all used temporaries allocated, by level.  */
!   struct varray_head_tag * GTY((param_is (struct temp_slot))) x_used_temp_slots;
! 
!   /* List of available temp slots.  */
!   struct temp_slot *x_avail_temp_slots;
  
    /* Current nesting level for temporaries.  */
    int x_temp_slot_level;
*************** extern int trampolines_created;
*** 563,569 ****
  #define rtl_expr_chain (cfun->x_rtl_expr_chain)
  #define last_parm_insn (cfun->x_last_parm_insn)
  #define function_call_count (cfun->x_function_call_count)
! #define temp_slots (cfun->x_temp_slots)
  #define temp_slot_level (cfun->x_temp_slot_level)
  #define target_temp_slot_level (cfun->x_target_temp_slot_level)
  #define var_temp_slot_level (cfun->x_var_temp_slot_level)
--- 566,573 ----
  #define rtl_expr_chain (cfun->x_rtl_expr_chain)
  #define last_parm_insn (cfun->x_last_parm_insn)
  #define function_call_count (cfun->x_function_call_count)
! #define used_temp_slots (cfun->x_used_temp_slots)
! #define avail_temp_slots (cfun->x_avail_temp_slots)
  #define temp_slot_level (cfun->x_temp_slot_level)
  #define target_temp_slot_level (cfun->x_target_temp_slot_level)
  #define var_temp_slot_level (cfun->x_var_temp_slot_level)
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.492
diff -c -3 -p -r1.492 tree.h
*** tree.h	13 May 2004 06:39:50 -0000	1.492
--- tree.h	13 May 2004 20:54:50 -0000
*************** extern void put_var_into_stack (tree, in
*** 3548,3554 ****
  extern void flush_addressof (tree);
  extern void setjmp_vars_warning (tree);
  extern void setjmp_args_warning (void);
- extern void mark_all_temps_used (void);
  extern void init_temp_slots (void);
  extern void combine_temp_slots (void);
  extern void free_temp_slots (void);
--- 3548,3553 ----


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