2006-01-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (get_constraint_for): Remove
anyoffset argument.
(get_constraint_for_component_ref): Likewise.
(do_deref): Likewise.
(get_constraint_for): Likewise.
(do_structure_copy): Likewise.
(handle_ptr_arith): Likewise.
(find_func_aliases): Likewise. Remove unused need_anyoffset
variable.
From-SVN: r109472
+2006-01-08 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (get_constraint_for): Remove
+ anyoffset argument.
+ (get_constraint_for_component_ref): Likewise.
+ (do_deref): Likewise.
+ (get_constraint_for): Likewise.
+ (do_structure_copy): Likewise.
+ (handle_ptr_arith): Likewise.
+ (find_func_aliases): Likewise. Remove unused need_anyoffset
+ variable.
+
2006-01-08 J"orn Rennecke <joern.rennecke@st.com>
Kaz Kojima <kkojima@gcc.gnu.org>
2006-01-08 J"orn Rennecke <joern.rennecke@st.com>
Kaz Kojima <kkojima@gcc.gnu.org>
typedef struct constraint_expr ce_s;
DEF_VEC_O(ce_s);
DEF_VEC_ALLOC_O(ce_s, heap);
typedef struct constraint_expr ce_s;
DEF_VEC_O(ce_s);
DEF_VEC_ALLOC_O(ce_s, heap);
-static void get_constraint_for (tree, VEC(ce_s, heap) **, bool *);
+static void get_constraint_for (tree, VEC(ce_s, heap) **);
static void do_deref (VEC (ce_s, heap) **);
/* Our set constraints are made up of two constraint expressions, one
static void do_deref (VEC (ce_s, heap) **);
/* Our set constraints are made up of two constraint expressions, one
/* Given a COMPONENT_REF T, return the constraint_expr for it. */
static void
/* Given a COMPONENT_REF T, return the constraint_expr for it. */
static void
-get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results,
- bool *anyoffset)
+get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results)
{
tree orig_t = t;
HOST_WIDE_INT bitsize = -1;
{
tree orig_t = t;
HOST_WIDE_INT bitsize = -1;
}
t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
}
t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
- get_constraint_for (t, results, anyoffset);
+ get_constraint_for (t, results);
result = VEC_last (ce_s, *results);
gcc_assert (beforelength + 1 == VEC_length (ce_s, *results));
result = VEC_last (ce_s, *results);
gcc_assert (beforelength + 1 == VEC_length (ce_s, *results));
{
result->offset = bitpos;
}
{
result->offset = bitpos;
}
- /* FIXME: Handle the DEREF case. */
- else if (anyoffset && result->type != DEREF)
- {
- result->offset = 0;
- *anyoffset = true;
- }
else
{
result->var = anything_id;
else
{
result->var = anything_id;
/* Given a tree T, return the constraint expression for it. */
static void
/* Given a tree T, return the constraint expression for it. */
static void
-get_constraint_for (tree t, VEC (ce_s, heap) **results, bool *anyoffset)
+get_constraint_for (tree t, VEC (ce_s, heap) **results)
{
struct constraint_expr temp;
{
struct constraint_expr temp;
struct constraint_expr *c;
unsigned int i;
struct constraint_expr *c;
unsigned int i;
- get_constraint_for (TREE_OPERAND (t, 0), results, anyoffset);
+ get_constraint_for (TREE_OPERAND (t, 0), results);
for (i = 0; VEC_iterate (ce_s, *results, i, c); i++)
{
if (c->type == DEREF)
for (i = 0; VEC_iterate (ce_s, *results, i, c); i++)
{
if (c->type == DEREF)
- get_constraint_for (TREE_OPERAND (t, 0), results, anyoffset);
+ get_constraint_for (TREE_OPERAND (t, 0), results);
do_deref (results);
return;
}
case ARRAY_REF:
case ARRAY_RANGE_REF:
case COMPONENT_REF:
do_deref (results);
return;
}
case ARRAY_REF:
case ARRAY_RANGE_REF:
case COMPONENT_REF:
- get_constraint_for_component_ref (t, results, anyoffset);
+ get_constraint_for_component_ref (t, results);
if (!(POINTER_TYPE_P (TREE_TYPE (t))
&& ! POINTER_TYPE_P (TREE_TYPE (op))))
{
if (!(POINTER_TYPE_P (TREE_TYPE (t))
&& ! POINTER_TYPE_P (TREE_TYPE (op))))
{
- get_constraint_for (op, results, anyoffset);
+ get_constraint_for (op, results);
- get_constraint_for (PHI_RESULT (t), results, anyoffset);
+ get_constraint_for (PHI_RESULT (t), results);
unsigned HOST_WIDE_INT lhssize;
unsigned HOST_WIDE_INT rhssize;
unsigned HOST_WIDE_INT lhssize;
unsigned HOST_WIDE_INT rhssize;
- get_constraint_for (lhsop, &lhsc, NULL);
- get_constraint_for (rhsop, &rhsc, NULL);
+ get_constraint_for (lhsop, &lhsc);
+ get_constraint_for (rhsop, &rhsc);
gcc_assert (VEC_length (ce_s, lhsc) == 1);
gcc_assert (VEC_length (ce_s, rhsc) == 1);
lhs = *(VEC_last (ce_s, lhsc));
gcc_assert (VEC_length (ce_s, lhsc) == 1);
gcc_assert (VEC_length (ce_s, rhsc) == 1);
lhs = *(VEC_last (ce_s, lhsc));
op0 = TREE_OPERAND (expr, 0);
op1 = TREE_OPERAND (expr, 1);
op0 = TREE_OPERAND (expr, 0);
op1 = TREE_OPERAND (expr, 1);
- get_constraint_for (op0, &temp, NULL);
+ get_constraint_for (op0, &temp);
if (POINTER_TYPE_P (TREE_TYPE (op0))
&& TREE_CODE (TREE_TYPE (TREE_TYPE (op0))) == RECORD_TYPE
&& TREE_CODE (op1) == INTEGER_CST)
if (POINTER_TYPE_P (TREE_TYPE (op0))
&& TREE_CODE (TREE_TYPE (TREE_TYPE (op0))) == RECORD_TYPE
&& TREE_CODE (op1) == INTEGER_CST)
/* For a phi node, assign all the arguments to
the result. */
/* For a phi node, assign all the arguments to
the result. */
- get_constraint_for (PHI_RESULT (t), &lhsc, NULL);
+ get_constraint_for (PHI_RESULT (t), &lhsc);
for (i = 0; i < PHI_NUM_ARGS (t); i++)
{
for (i = 0; i < PHI_NUM_ARGS (t); i++)
{
- get_constraint_for (PHI_ARG_DEF (t, i), &rhsc, NULL);
+ get_constraint_for (PHI_ARG_DEF (t, i), &rhsc);
for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++)
{
struct constraint_expr *c2;
for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++)
{
struct constraint_expr *c2;
struct constraint_expr lhs ;
struct constraint_expr *rhsp;
struct constraint_expr lhs ;
struct constraint_expr *rhsp;
- get_constraint_for (arg, &rhsc, NULL);
+ get_constraint_for (arg, &rhsc);
if (TREE_CODE (decl) != FUNCTION_DECL)
{
lhs.type = DEREF;
if (TREE_CODE (decl) != FUNCTION_DECL)
{
lhs.type = DEREF;
struct constraint_expr *lhsp;
unsigned int j = 0;
struct constraint_expr *lhsp;
unsigned int j = 0;
- get_constraint_for (lhsop, &lhsc, NULL);
+ get_constraint_for (lhsop, &lhsc);
if (TREE_CODE (decl) != FUNCTION_DECL)
{
rhs.type = DEREF;
if (TREE_CODE (decl) != FUNCTION_DECL)
{
rhs.type = DEREF;
|| AGGREGATE_TYPE_P (TREE_TYPE (lhsop))
|| TREE_CODE (rhsop) == CALL_EXPR)
{
|| AGGREGATE_TYPE_P (TREE_TYPE (lhsop))
|| TREE_CODE (rhsop) == CALL_EXPR)
{
- get_constraint_for (lhsop, &lhsc, NULL);
+ get_constraint_for (lhsop, &lhsc);
switch (TREE_CODE_CLASS (TREE_CODE (rhsop)))
{
/* RHS that consist of unary operations,
switch (TREE_CODE_CLASS (TREE_CODE (rhsop)))
{
/* RHS that consist of unary operations,
case tcc_unary:
{
unsigned int j;
case tcc_unary:
{
unsigned int j;
- bool need_anyoffset = false;
tree strippedrhs = rhsop;
tree rhstype;
tree strippedrhs = rhsop;
tree rhstype;
STRIP_NOPS (strippedrhs);
rhstype = TREE_TYPE (strippedrhs);
STRIP_NOPS (strippedrhs);
rhstype = TREE_TYPE (strippedrhs);
- get_constraint_for (rhsop, &rhsc, &need_anyoffset);
+ get_constraint_for (rhsop, &rhsc);
if (TREE_CODE (strippedrhs) == ADDR_EXPR
&& AGGREGATE_TYPE_P (TREE_TYPE (rhstype)))
{
if (TREE_CODE (strippedrhs) == ADDR_EXPR
&& AGGREGATE_TYPE_P (TREE_TYPE (rhstype)))
{
unsigned int j;
gcc_assert (VEC_length (ce_s, rhsc) == 0);
unsigned int j;
gcc_assert (VEC_length (ce_s, rhsc) == 0);
- get_constraint_for (op, &rhsc, NULL);
+ get_constraint_for (op, &rhsc);
for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++)
{
struct constraint_expr *c2;
for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++)
{
struct constraint_expr *c2;