diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-14 09:59:18 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-14 09:59:18 +0000 |
commit | 3a4438438e8c85036b3cf79cbbf030f0d726db88 (patch) | |
tree | 9a0cf325e4020743f8ce27cb07e9a9ab48e57513 /gcc/emit-rtl.c | |
parent | dd20d2ca0f756cf4914f21cbb863e808bd3879ad (diff) | |
download | gcc-3a4438438e8c85036b3cf79cbbf030f0d726db88.tar.gz |
2009-07-14 Richard Guenther <rguenther@suse.de>
Andrey Belevantsev <abel@ispras.ru>
* tree-ssa-alias.h (refs_may_alias_p_1): Declare.
(pt_solution_set): Likewise.
* tree-ssa-alias.c (refs_may_alias_p_1): Export.
* tree-ssa-structalias.c (pt_solution_set): New function.
* final.c (rest_of_clean_state): Free SSA data structures.
* print-rtl.c (print_decl_name): Remove.
(print_mem_expr): Implement in terms of print_generic_expr.
* alias.c (ao_ref_from_mem): New function.
(rtx_refs_may_alias_p): Likewise.
(true_dependence): Query alias-export info.
(canon_true_dependence): Likewise.
(write_dependence_p): Likewise.
* tree-dfa.c (get_ref_base_and_extent): For void types leave
size unknown.
* emit-rtl.c (component_ref_for_mem_expr): Remove.
(mem_expr_equal_p): Use operand_equal_p.
(set_mem_attributes_minus_bitpos): Do not use
component_ref_for_mem_expr.
* cfgexpand.c (add_partitioned_vars_to_ptset): New function.
(update_alias_info_with_stack_vars): Likewise.
(partition_stack_vars): Call update_alias_info_with_stack_vars.
* tree-ssa.c (delete_tree_ssa): Do not release SSA names
explicitly nor clear stmt operands.
Free the decl-to-pointer map.
* tree-optimize.c (execute_free_datastructures): Do not free
SSA data structures here.
* tree-flow.h (struct gimple_df): Add decls_to_pointers member.
* Makefile.in (emit-rtl.o): Add pointer-set.h dependency.
(alias.o): Add tree-ssa-alias.h, pointer-set.h and $(TREE_FLOW_H)
dependencies.
(print-rtl.o): Add $(DIAGNOSTIC_H) dependency.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149624 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 58 |
1 files changed, 4 insertions, 54 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index d20f2b55273..5b42f4a8778 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -197,7 +197,6 @@ static mem_attrs *get_mem_attrs (alias_set_type, tree, rtx, rtx, unsigned int, static hashval_t reg_attrs_htab_hash (const void *); static int reg_attrs_htab_eq (const void *, const void *); static reg_attrs *get_reg_attrs (tree, int); -static tree component_ref_for_mem_expr (tree); static rtx gen_const_vector (enum machine_mode, int); static void copy_rtx_if_shared_1 (rtx *orig); @@ -1429,40 +1428,6 @@ operand_subword_force (rtx op, unsigned int offset, enum machine_mode mode) return result; } -/* Within a MEM_EXPR, we care about either (1) a component ref of a decl, - or (2) a component ref of something variable. Represent the later with - a NULL expression. */ - -static tree -component_ref_for_mem_expr (tree ref) -{ - tree inner = TREE_OPERAND (ref, 0); - - if (TREE_CODE (inner) == COMPONENT_REF) - inner = component_ref_for_mem_expr (inner); - else - { - /* Now remove any conversions: they don't change what the underlying - object is. Likewise for SAVE_EXPR. */ - while (CONVERT_EXPR_P (inner) - || TREE_CODE (inner) == VIEW_CONVERT_EXPR - || TREE_CODE (inner) == SAVE_EXPR) - inner = TREE_OPERAND (inner, 0); - - if (! DECL_P (inner)) - inner = NULL_TREE; - } - - if (inner == TREE_OPERAND (ref, 0) - /* Don't leak SSA-names in the third operand. */ - && (!TREE_OPERAND (ref, 2) - || TREE_CODE (TREE_OPERAND (ref, 2)) != SSA_NAME)) - return ref; - else - return build3 (COMPONENT_REF, TREE_TYPE (ref), inner, - TREE_OPERAND (ref, 1), NULL_TREE); -} - /* Returns 1 if both MEM_EXPR can be considered equal and 0 otherwise. */ @@ -1478,23 +1443,7 @@ mem_expr_equal_p (const_tree expr1, const_tree expr2) if (TREE_CODE (expr1) != TREE_CODE (expr2)) return 0; - if (TREE_CODE (expr1) == COMPONENT_REF) - return - mem_expr_equal_p (TREE_OPERAND (expr1, 0), - TREE_OPERAND (expr2, 0)) - && mem_expr_equal_p (TREE_OPERAND (expr1, 1), /* field decl */ - TREE_OPERAND (expr2, 1)); - - if (INDIRECT_REF_P (expr1)) - return mem_expr_equal_p (TREE_OPERAND (expr1, 0), - TREE_OPERAND (expr2, 0)); - - /* ARRAY_REFs, ARRAY_RANGE_REFs and BIT_FIELD_REFs should already - have been resolved here. */ - gcc_assert (DECL_P (expr1)); - - /* Decls with different pointers can't be equal. */ - return 0; + return operand_equal_p (expr1, expr2, 0); } /* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN @@ -1732,7 +1681,7 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, else if (TREE_CODE (t) == COMPONENT_REF && ! DECL_BIT_FIELD (TREE_OPERAND (t, 1))) { - expr = component_ref_for_mem_expr (t); + expr = t; offset = const0_rtx; apply_bitpos = bitpos; /* ??? Any reason the field size would be different than @@ -1789,7 +1738,8 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, } else if (TREE_CODE (t2) == COMPONENT_REF) { - expr = component_ref_for_mem_expr (t2); + expr = t2; + offset = NULL; if (host_integerp (off_tree, 1)) { offset = GEN_INT (tree_low_cst (off_tree, 1)); |