aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenth@gcc.gnu.org>2005-06-02 22:05:13 +0000
committerRichard Guenther <rguenth@gcc.gnu.org>2005-06-02 22:05:13 +0000
commit0abe6a6cbe621016869de0180998c93fa4d385d3 (patch)
tree6cd4509b34a9c48491236112d638189abd4ab478 /gcc/tree-ssa-loop-ivopts.c
parentb374fbf11029803ecc4cf2a2fb928f01acdfe07b (diff)
2005-06-03 Richard Guenther <rguenth@gcc.gnu.org>
* tree-ssa-loop-ivopts.c (build_addr_strip_iref): Remove. (find_interesting_uses_address): Use build_fold_addr_expr instead. (strip_offset_1): Likewise. (tree_to_aff_combination): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100519 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 8e4a574e8a8..81bec044c5f 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -1511,25 +1511,6 @@ may_be_unaligned_p (tree ref)
return false;
}
-/* Builds ADDR_EXPR of object OBJ. If OBJ is an INDIRECT_REF, the indirect_ref
- is stripped instead. */
-
-static tree
-build_addr_strip_iref (tree obj)
-{
- tree type;
-
- if (TREE_CODE (obj) == INDIRECT_REF)
- {
- type = build_pointer_type (TREE_TYPE (obj));
- obj = fold_convert (type, TREE_OPERAND (obj, 0));
- }
- else
- obj = build_addr (obj, current_function_decl);
-
- return obj;
-}
-
/* Finds addresses in *OP_P inside STMT. */
static void
@@ -1564,7 +1545,7 @@ find_interesting_uses_address (struct ivopts_data *data, tree stmt, tree *op_p)
gcc_assert (TREE_CODE (base) != ALIGN_INDIRECT_REF);
gcc_assert (TREE_CODE (base) != MISALIGNED_INDIRECT_REF);
- base = build_addr_strip_iref (base);
+ base = build_fold_addr_expr (base);
civ = alloc_iv (base, step);
record_use (data, op_p, civ, stmt, USE_ADDRESS);
@@ -1857,7 +1838,7 @@ strip_offset_1 (tree expr, bool inside_addr, bool top_compref,
if (op0 == TREE_OPERAND (expr, 0))
return orig_expr;
- expr = build_addr_strip_iref (op0);
+ expr = build_fold_addr_expr (op0);
return fold_convert (orig_type, expr);
case INDIRECT_REF:
@@ -2845,7 +2826,7 @@ tree_to_aff_combination (tree expr, tree type,
if (bitpos % BITS_PER_UNIT != 0)
break;
aff_combination_const (comb, type, bitpos / BITS_PER_UNIT);
- core = build_addr_strip_iref (core);
+ core = build_fold_addr_expr (core);
if (TREE_CODE (core) == ADDR_EXPR)
aff_combination_add_elt (comb, core, 1);
else