aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-08-16 09:55:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-08-16 09:55:54 +0000
commit4b228e61a98d8bdd1286e536a1f74cdbce50d0ff (patch)
tree4edd6a80f5f5a0a0c23401f9e90a871371fc79be /gcc/tree-ssa-loop-ivopts.c
parentfa4e6c7b4b3faf893227ef83e0b815917acc4976 (diff)
downloadgcc-4b228e61a98d8bdd1286e536a1f74cdbce50d0ff.zip
gcc-4b228e61a98d8bdd1286e536a1f74cdbce50d0ff.tar.gz
gcc-4b228e61a98d8bdd1286e536a1f74cdbce50d0ff.tar.bz2
tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit.
2010-08-16 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit. * tree-ssa-address.c (addr_for_mem_ref): Adjust. (create_mem_ref_raw): Always create TMR_OFFSET, store the alias pointer type via it. (copy_mem_ref_info): Adjust. (maybe_fold_tmr): Likewise. * tree.c (mem_ref_offset): Also handle TARGET_MEM_REF. (reference_alias_ptr_type): Likewise. * tree.def (TARGET_MEM_REF): Remove TMR_ORIGINAL operand, adjust documentation of TMR_OFFSET operand. * alias.c (get_alias_set): Do not look at TMR_ORIGINAL but use the alias pointer type. * expr.c (expand_expr_real_1): Do not use TMR_ORIGINAL to initialize mem attrs but the TMR itself. * tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REF similar to MEM_REF. * tree-pretty-print.c (dump_generic_node): Do not dump TMR_ORIGINAL. * tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Remove. (unshare_and_remove_ssa_names): Likewise. (copy_ref_info): Adjust. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Simplify TARGET_MEM_REF case. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Do not look at TMR_ORIGINAL. * tree.h (TMR_ORIGINAL): Remove. * gimple.c (get_base_address): For TARGET_MEM_REF with a symbol return that. * tree-dfa.c (get_ref_base_and_extent): Handle TARGET_MEM_REF with a symbol. (get_addr_base_and_unit_offset): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Handle TARGET_MEM_REFs. (indirect_ref_may_alias_decl_p): Likewise. (refs_may_alias_p_1): Do not bail out for TARGET_MEM_REFs. From-SVN: r163278
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index c940d41..f0c3ca9 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5880,44 +5880,6 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data,
}
}
-/* Replaces ssa name in index IDX by its basic variable. Callback for
- for_each_index. */
-
-static bool
-idx_remove_ssa_names (tree base, tree *idx,
- void *data ATTRIBUTE_UNUSED)
-{
- tree *op;
-
- if (TREE_CODE (*idx) == SSA_NAME)
- *idx = SSA_NAME_VAR (*idx);
-
- if (TREE_CODE (base) == ARRAY_REF || TREE_CODE (base) == ARRAY_RANGE_REF)
- {
- op = &TREE_OPERAND (base, 2);
- if (*op
- && TREE_CODE (*op) == SSA_NAME)
- *op = SSA_NAME_VAR (*op);
- op = &TREE_OPERAND (base, 3);
- if (*op
- && TREE_CODE (*op) == SSA_NAME)
- *op = SSA_NAME_VAR (*op);
- }
-
- return true;
-}
-
-/* Unshares REF and replaces ssa names inside it by their basic variables. */
-
-static tree
-unshare_and_remove_ssa_names (tree ref)
-{
- ref = unshare_expr (ref);
- for_each_index (&ref, idx_remove_ssa_names, NULL);
-
- return ref;
-}
-
/* Copies the reference information from OLD_REF to NEW_REF. */
static void
@@ -5925,12 +5887,6 @@ copy_ref_info (tree new_ref, tree old_ref)
{
tree new_ptr_base = NULL_TREE;
- if (TREE_CODE (old_ref) == TARGET_MEM_REF
- && TREE_CODE (new_ref) == TARGET_MEM_REF)
- TMR_ORIGINAL (new_ref) = TMR_ORIGINAL (old_ref);
- else if (TREE_CODE (new_ref) == TARGET_MEM_REF)
- TMR_ORIGINAL (new_ref) = unshare_and_remove_ssa_names (old_ref);
-
TREE_SIDE_EFFECTS (new_ref) = TREE_SIDE_EFFECTS (old_ref);
TREE_THIS_VOLATILE (new_ref) = TREE_THIS_VOLATILE (old_ref);