diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-03 09:50:17 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-03 09:50:17 +0000 |
commit | 28daba6f2cf86e80ffa7fd691ec1029fe3418213 (patch) | |
tree | 906679b413fe977c9a6b6281ce7ba070a3cf8a52 /gcc/gimple.c | |
parent | 56c34a25b0df27218d1b62750baab69a05b7f468 (diff) | |
download | gcc-28daba6f2cf86e80ffa7fd691ec1029fe3418213.tar.gz |
2010-09-03 Richard Guenther <rguenther@suse.de>
* tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.
Move TMR_OFFSET to second operand. Add TMR_INDEX2.
* tree.h (TMR_SYMBOL): Remove.
(TMR_BASE, TMR_OFFSET): Adjust.
(TMR_INDEX2): New.
* alias.c (ao_ref_from_mem): Use TMR_BASE.
* builtins.c (get_object_alignment): Merge TMR_BASE and
TMR_SYMBOL handling.
* cfgexpand.c (expand_debug_expr): Use TMR_BASE.
* gimple.c (get_base_address): Merge MEM_REF and TARGET_MEM_REF
handling. Also allow TARGET_MEM_REF as base address.
(walk_stmt_load_store_addr_ops): TMR_BASE is always non-NULL.
* gimplify.c (gimplify_expr): Gimplify TMR_BASE like MEM_REF
base. Gimplify TMR_INDEX2.
* tree-cfg.c (verify_types_in_gimple_reference): Adjust.
* tree-dfa.c (get_ref_base_and_extent): Likewise.
(get_addr_base_and_unit_offset): Likewise.
* tree-eh.c (tree_could_trap_p): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-address.c (tree_mem_ref_addr): Simplify. Handle
TMR_INDEX2.
(create_mem_ref_raw): Merge symbol and base. Move 2ndary
base to index2.
(get_address_description): Reconstruct addres description
from merged TMR_BASE and TMR_INDEX2.
(maybe_fold_tmr): Fold propagated addresses.
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Merge
MEM_REF and TARGET_MEM_REF paths.
(indirect_refs_may_alias_p): Likewise.
* tree-ssa-live.c (mark_all_vars_used_1): Handle TMR_INDEX2
instead of TMR_SYMBOL.
* tree-ssa-operands.c (get_tmr_operands): Simplify.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Adjust
according to changes ...
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): ... here.
Split TARGET_MEM_REF into two fields plus the base.
* tree.c (mem_ref_offset): Simplify.
* tree-ssa-loop-im.c (for_each_index): Handle TMR_INDEX2.
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise.
Strip NOPs when folding MEM_REF addresses.
* tree-ssa-sink.c (is_hidden_global_store): Handle TARGET_MEM_REF.
* gimple-fold.c (maybe_fold_reference): Fold TARGET_MEM_REF here ...
(fold_gimple_assign): ... not here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index c0b5052eb54..bb68be691ad 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -3004,18 +3004,17 @@ get_base_address (tree t) while (handled_component_p (t)) t = TREE_OPERAND (t, 0); - if (TREE_CODE (t) == MEM_REF + if ((TREE_CODE (t) == MEM_REF + || TREE_CODE (t) == TARGET_MEM_REF) && TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR) t = TREE_OPERAND (TREE_OPERAND (t, 0), 0); - else if (TREE_CODE (t) == TARGET_MEM_REF - && TMR_SYMBOL (t)) - t = TREE_OPERAND (TMR_SYMBOL (t), 0); if (SSA_VAR_P (t) || TREE_CODE (t) == STRING_CST || TREE_CODE (t) == CONSTRUCTOR || INDIRECT_REF_P (t) - || TREE_CODE (t) == MEM_REF) + || TREE_CODE (t) == MEM_REF + || TREE_CODE (t) == TARGET_MEM_REF) return t; else return NULL_TREE; @@ -4725,7 +4724,6 @@ walk_stmt_load_store_addr_ops (gimple stmt, void *data, if (TREE_CODE (rhs) == ADDR_EXPR) ret |= visit_addr (stmt, TREE_OPERAND (rhs, 0), data); else if (TREE_CODE (rhs) == TARGET_MEM_REF - && TMR_BASE (rhs) != NULL_TREE && TREE_CODE (TMR_BASE (rhs)) == ADDR_EXPR) ret |= visit_addr (stmt, TREE_OPERAND (TMR_BASE (rhs), 0), data); else if (TREE_CODE (rhs) == OBJ_TYPE_REF @@ -4734,7 +4732,6 @@ walk_stmt_load_store_addr_ops (gimple stmt, void *data, 0), data); lhs = gimple_assign_lhs (stmt); if (TREE_CODE (lhs) == TARGET_MEM_REF - && TMR_BASE (lhs) != NULL_TREE && TREE_CODE (TMR_BASE (lhs)) == ADDR_EXPR) ret |= visit_addr (stmt, TREE_OPERAND (TMR_BASE (lhs), 0), data); } |