aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-03 09:50:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-03 09:50:17 +0000
commit4d948885d0d10918e53b9d91fde81c4f47d837a8 (patch)
tree906679b413fe977c9a6b6281ce7ba070a3cf8a52 /gcc/gimplify.c
parentb3ec52d088106728c7c8acda2e736e09b6e70b4f (diff)
downloadgcc-4d948885d0d10918e53b9d91fde81c4f47d837a8.zip
gcc-4d948885d0d10918e53b9d91fde81c4f47d837a8.tar.gz
gcc-4d948885d0d10918e53b9d91fde81c4f47d837a8.tar.bz2
tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.
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. From-SVN: r163802
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index bdb97ec..1723f42 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6977,20 +6977,15 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
{
enum gimplify_status r0 = GS_ALL_DONE, r1 = GS_ALL_DONE;
- if (TMR_SYMBOL (*expr_p))
- /* We can't gimplify the symbol part. Assert it is
- already gimple instead.
- ??? This isn't exactly the same as ADDR_EXPR
- plus is_gimple_mem_ref_addr (), see fixed_address_object_p. */
- gcc_assert (TREE_CODE (TMR_SYMBOL (*expr_p)) == ADDR_EXPR
- && (TREE_CODE (TREE_OPERAND (TMR_SYMBOL (*expr_p), 0))
- == VAR_DECL));
if (TMR_BASE (*expr_p))
r0 = gimplify_expr (&TMR_BASE (*expr_p), pre_p,
- post_p, is_gimple_val, fb_either);
+ post_p, is_gimple_mem_ref_addr, fb_either);
if (TMR_INDEX (*expr_p))
r1 = gimplify_expr (&TMR_INDEX (*expr_p), pre_p,
post_p, is_gimple_val, fb_rvalue);
+ if (TMR_INDEX2 (*expr_p))
+ r1 = gimplify_expr (&TMR_INDEX2 (*expr_p), pre_p,
+ post_p, is_gimple_val, fb_rvalue);
/* TMR_STEP and TMR_OFFSET are always integer constants. */
ret = MIN (r0, r1);
}