aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-address.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-01 13:28:46 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-01 13:28:46 +0000
commit23a534a102ad0310ca6ccb35717bb54e102ffb3e (patch)
tree49f5344b822f529a83c1f7785cefc66b2fc375d8 /gcc/tree-ssa-address.c
parentd8b08ecdf6138d3b3bd0c6b47b58d794b4bd5521 (diff)
downloadgcc-23a534a102ad0310ca6ccb35717bb54e102ffb3e.zip
gcc-23a534a102ad0310ca6ccb35717bb54e102ffb3e.tar.gz
gcc-23a534a102ad0310ca6ccb35717bb54e102ffb3e.tar.bz2
alias.c (ao_ref_from_mem): Adjust.
2010-09-01 Richard Guenther <rguenther@suse.de> * alias.c (ao_ref_from_mem): Adjust. * builtins.c (get_object_alignment): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * gimple.c (get_base_address): Likewise. * tree-dfa.c (get_ref_base_and_extent): Likewise. (get_addr_base_and_unit_offset): Likewise. Fix for both TMR_SYMBOL and TMR_BASE being set. * tree-eh.c (tree_could_trap_p): Likewise. * gimplify.c (gimplify_expr): Do not attempt to gimplify TMR_SYMBOL. Always gimplify TMR_BASE. * tree-cfg.c (verify_types_in_gimple_reference): Verify TMR_BASE if there is a TMR_SYMBOL. * tree-pretty-print.c (dump_generic_node): Adjust. * tree-ssa-address.c (addr_for_mem_ref): Likewise. (tree_mem_ref_addr): Likewise. (create_mem_ref_raw): Likewise. (move_fixed_address_to_symbol): Likewise. (create_mem_ref): Likewise. (dump_mem_address): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Adjust. Fix for both TMR_SYMBOL and TMR_BASE being set. (indirect_refs_may_alias_p): Likewise. * tree-ssa-operands.c (get_tmr_operands): Adjust. * tree.def (TARGET_MEM_REF): Adjust documentation. From-SVN: r163733
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r--gcc/tree-ssa-address.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index ffc5541..d642425 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -247,8 +247,7 @@ addr_for_mem_ref (struct mem_address *addr, addr_space_t as,
/* Otherwise really expand the expressions. */
sym = (addr->symbol
- ? expand_expr (build_addr (addr->symbol, current_function_decl),
- NULL_RTX, address_mode, EXPAND_NORMAL)
+ ? expand_expr (addr->symbol, NULL_RTX, address_mode, EXPAND_NORMAL)
: NULL_RTX);
bse = (addr->base
? expand_expr (addr->base, NULL_RTX, address_mode, EXPAND_NORMAL)
@@ -273,9 +272,10 @@ tree_mem_ref_addr (tree type, tree mem_ref)
tree addr_base = NULL_TREE, addr_off = NULL_TREE;
if (sym)
- addr_base = fold_convert (type, build_addr (sym, current_function_decl));
- else if (base && POINTER_TYPE_P (TREE_TYPE (base)))
+ addr_base = fold_convert (type, sym);
+ else if (base)
{
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (base)));
addr_base = fold_convert (type, base);
base = NULL_TREE;
}
@@ -363,7 +363,7 @@ create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr)
tree base;
gcc_assert (!addr->symbol ^ !addr->base);
if (addr->symbol)
- base = build_fold_addr_expr (addr->symbol);
+ base = addr->symbol;
else
base = addr->base;
return fold_build2 (MEM_REF, type, base, addr->offset);
@@ -408,7 +408,7 @@ move_fixed_address_to_symbol (struct mem_address *parts, aff_tree *addr)
if (i == addr->n)
return;
- parts->symbol = TREE_OPERAND (val, 0);
+ parts->symbol = val;
aff_combination_remove_elt (addr, i);
}
@@ -717,7 +717,7 @@ create_mem_ref (gimple_stmt_iterator *gsi, tree type, aff_tree *addr,
if (parts.symbol)
{
- tmp = build_addr (parts.symbol, current_function_decl);
+ tmp = parts.symbol;
gcc_assert (is_gimple_val (tmp));
/* Add the symbol to base, eventually forcing it to register. */
@@ -883,7 +883,7 @@ dump_mem_address (FILE *file, struct mem_address *parts)
if (parts->symbol)
{
fprintf (file, "symbol: ");
- print_generic_expr (file, parts->symbol, TDF_SLIM);
+ print_generic_expr (file, TREE_OPERAND (parts->symbol, 0), TDF_SLIM);
fprintf (file, "\n");
}
if (parts->base)