View | Details | Raw Unified
Collapse All | Expand All

(-) gcc/tree-ssa-structalias.c (-8 / +45 lines)
 Lines 708-713   solution_set_add (bitmap set, unsigned H Link Here 
  bitmap result = BITMAP_ALLOC (&iteration_obstack);
  bitmap result = BITMAP_ALLOC (&iteration_obstack);
  unsigned int i;
  unsigned int i;
  bitmap_iterator bi;
  bitmap_iterator bi;
  unsigned HOST_WIDE_INT min = -1, max = 0;
  /* Compute set of vars we can reach from set + offset.  */
  EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
    {
      if (get_varinfo (i)->is_artificial_var
	  || get_varinfo (i)->has_union
	  || get_varinfo (i)->is_unknown_size_var)
	continue;
      if (get_varinfo (i)->offset + offset < min)
	min = get_varinfo (i)->offset + offset;
      if (get_varinfo (i)->offset + get_varinfo (i)->size + offset > max)
	{
	  max = get_varinfo (i)->offset + get_varinfo (i)->size + offset;
	  if (max > get_varinfo (i)->fullsize)
	    max = get_varinfo (i)->fullsize;
	}
    }
  EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
  EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
    {
    {
 Lines 715-727   solution_set_add (bitmap set, unsigned H Link Here 
	 less than end.  Otherwise, it is globbed to a single
	 less than end.  Otherwise, it is globbed to a single
	 variable.  */
	 variable.  */
      if ((get_varinfo (i)->offset + offset) < get_varinfo (i)->fullsize)
      if (get_varinfo (i)->offset + get_varinfo (i)->size - 1 >= min
	  && get_varinfo (i)->offset < max)
	{
	{
	  unsigned HOST_WIDE_INT fieldoffset = get_varinfo (i)->offset + offset;
	  bitmap_set_bit (result, i);
	  varinfo_t v = first_vi_for_offset (get_varinfo (i), fieldoffset);
	  if (!v)
	    continue;
	  bitmap_set_bit (result, v->id);
	}
	}
      else if (get_varinfo (i)->is_artificial_var
      else if (get_varinfo (i)->is_artificial_var
	       || get_varinfo (i)->has_union
	       || get_varinfo (i)->has_union
 Lines 3258-3264   handle_ptr_arith (VEC (ce_s, heap) *lhsc Link Here 
  unsigned int i = 0;
  unsigned int i = 0;
  unsigned int j = 0;
  unsigned int j = 0;
  VEC (ce_s, heap) *temp = NULL;
  VEC (ce_s, heap) *temp = NULL;
  unsigned int rhsoffset = 0;
  unsigned HOST_WIDE_INT rhsoffset = 0;
  if (TREE_CODE (expr) != PLUS_EXPR
  if (TREE_CODE (expr) != PLUS_EXPR
      && TREE_CODE (expr) != MINUS_EXPR)
      && TREE_CODE (expr) != MINUS_EXPR)
 Lines 3269-3277   handle_ptr_arith (VEC (ce_s, heap) *lhsc Link Here 
  get_constraint_for (op0, &temp);
  get_constraint_for (op0, &temp);
  if (POINTER_TYPE_P (TREE_TYPE (op0))
  if (POINTER_TYPE_P (TREE_TYPE (op0))
      && TREE_CODE (op1) == INTEGER_CST
      && host_integerp (op1, 1)
      && TREE_CODE (expr) == PLUS_EXPR)
      && TREE_CODE (expr) == PLUS_EXPR)
    {
    {
      if ((TREE_INT_CST_LOW (op1) * BITS_PER_UNIT) / BITS_PER_UNIT
	  != TREE_INT_CST_LOW (op1))
	return false;
      rhsoffset = TREE_INT_CST_LOW (op1) * BITS_PER_UNIT;
      rhsoffset = TREE_INT_CST_LOW (op1) * BITS_PER_UNIT;
    }
    }
  else
  else
 Lines 3661-3666   push_fields_onto_fieldstack (tree type, Link Here 
{
{
  tree field;
  tree field;
  int count = 0;
  int count = 0;
  unsigned HOST_WIDE_INT minoffset = -1;
  if (TREE_CODE (type) == COMPLEX_TYPE)
  if (TREE_CODE (type) == COMPLEX_TYPE)
    {
    {
 Lines 3773-3780   push_fields_onto_fieldstack (tree type, Link Here 
	  }
	  }
	else
	else
	  count += pushed;
	  count += pushed;
	if (bitpos_of_field (field) < minoffset)
	  minoffset = bitpos_of_field (field);
      }
      }
  /* We need to create a fake subvar for empty bases.  */
  if (minoffset != 0 && count != 0)
    {
      fieldoff_s *pair;
      pair = VEC_safe_push (fieldoff_s, heap, *fieldstack, NULL);
      pair->type = void_type_node;
      pair->size = build_int_cst (size_type_node, minoffset);
      pair->decl = NULL;
      pair->offset = offset;
      count++;
    }
  return count;
  return count;
}
}