summaryrefslogtreecommitdiffstats
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-22 00:42:28 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-22 00:42:28 +0000
commitd0186307062d00b77b83f0fb907604943f3493cc (patch)
tree4b807050400db7408a16243b129aa442be14c1d6 /gcc/tree-ssa-structalias.c
parentc0790887e53a275fa58f4fbf438d81dc73a6130c (diff)
downloadppe42-gcc-d0186307062d00b77b83f0fb907604943f3493cc.tar.gz
ppe42-gcc-d0186307062d00b77b83f0fb907604943f3493cc.zip
2005-09-20 Daniel Berlin <dberlin@dberlin.org>
* tree-data-ref.c (analyze_array_indexes): Only estimate when estimate_only is true. * tree-flow.h (ref_contains_indirect_ref): New prototype. * tree-flow-inline.h (ref_contains_indirect_ref): Moved from tree-ssa-structalias.c * tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Use ref_contains_indirect_ref. * tree-ssa-structalias.c (ref_contains_indirect_ref): Moved. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c29
1 files changed, 6 insertions, 23 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index a1c0f05b0b1..c41519ca846 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2008,12 +2008,12 @@ offset_overlaps_with_access (const unsigned HOST_WIDE_INT fieldpos,
/* Given a COMPONENT_REF T, return the constraint_expr for it. */
static struct constraint_expr
-get_constraint_for_component_ref (tree t, bool *needs_anyoffset)
+get_constraint_for_component_ref (tree t, bool *need_anyoffset)
{
struct constraint_expr result;
- HOST_WIDE_INT bitsize;
+ HOST_WIDE_INT bitsize = -1;
HOST_WIDE_INT bitpos;
- tree offset;
+ tree offset = NULL_TREE;
enum machine_mode mode;
int unsignedp;
int volatilep;
@@ -2039,7 +2039,7 @@ get_constraint_for_component_ref (tree t, bool *needs_anyoffset)
t = get_inner_reference (t, &bitsize, &bitpos, &offset, &mode,
&unsignedp, &volatilep, false);
- result = get_constraint_for (t, needs_anyoffset);
+ result = get_constraint_for (t, need_anyoffset);
/* This can also happen due to weird offsetof type macros. */
if (TREE_CODE (t) != ADDR_EXPR && result.type == ADDRESSOF)
@@ -2051,10 +2051,10 @@ get_constraint_for_component_ref (tree t, bool *needs_anyoffset)
{
result.offset = bitpos;
}
- else if (needs_anyoffset)
+ else if (need_anyoffset)
{
result.offset = 0;
- *needs_anyoffset = true;
+ *need_anyoffset = true;
}
else
{
@@ -2510,23 +2510,6 @@ do_structure_copy (tree lhsop, tree rhsop)
}
}
-
-/* Return true if REF, a COMPONENT_REF, has an INDIRECT_REF somewhere
- in it. */
-
-static inline bool
-ref_contains_indirect_ref (tree ref)
-{
- while (handled_component_p (ref))
- {
- if (TREE_CODE (ref) == INDIRECT_REF)
- return true;
- ref = TREE_OPERAND (ref, 0);
- }
- return false;
-}
-
-
/* Update related alias information kept in AI. This is used when
building name tags, alias sets and deciding grouping heuristics.
STMT is the statement to process. This function also updates
OpenPOWER on IntegriCloud