summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-07 12:01:47 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-07 12:01:47 +0000
commitaed164c3b749041e52ddb15d0114078e9dbeb7ae (patch)
tree378327f436c131f3eecc7128a199fdc378d9aa28 /gcc/tree.h
parentf51f5e0bd567736a3a70ba71798a8ae32dce5ab9 (diff)
downloadgcc-aed164c3b749041e52ddb15d0114078e9dbeb7ae.tar.gz
* tree-ssa-address.c: New file.
* Makefile.in (tree-ssa-address.o): Add. * expr.c (expand_expr_real_1): Do not handle REF_ORIGINAL on INDIRECT_REFs. Handle TARGET_MEM_REFs. * tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REFs. * tree-flow.h (struct mem_address): New. (struct affine_tree_combination): Moved from tree-ssa-loop-ivopts.c. (create_mem_ref, addr_for_mem_ref, get_address_description, maybe_fold_tmr, multiplier_allowed_in_address_p, multiply_by_cost): Declare. * tree-mudflap.c (mf_xform_derefs_1): Handle TARGET_MEM_REFs. * tree-pretty-print.c (dump_generic_node): Ditto. * tree-ssa-loop-im.c (for_each_index): Ditto. * tree-ssa-loop-ivopts.c (may_be_unaligned_p, find_interesting_uses_address): Ditto. (rewrite_address_base, build_addr_strip_iref): Removed. (struct affine_tree_combination): Moved to tree-flow.h. (get_ref_tag, copy_ref_info): New functions. (rewrite_use_address): Produce TARGET_MEM_REFs. (tree_ssa_iv_optimize): Do not call update_ssa and rewrite_into_loop_closed_ssa. (tree_to_aff_combination): Use build_fold_addr_expr instead of build_addr_strip_iref. (unshare_aff_combination): New function. (fold_affine_sum): Removed. (get_computation_at): Use get_computation_aff. Unshare the result. (get_computation_aff, multiplier_allowed_in_address_p): New function. (multiply_by_cost): Exported. (get_address_cost): Use multiplier_allowed_in_address_p. * tree-ssa-operands.c (get_tmr_operands): New function. (get_expr_operands): Handle TARGET_MEM_REFs. * tree.c (copy_node_stat): Copy annotations for TARGET_MEM_REFs. (build): Handle 7 arguments. (build7_stat): New function. * tree.def (TARGET_MEM_DEF): New. * tree.h (REF_ORIGINAL): Removed. (TMR_SYMBOL, TMR_BASE, TMR_INDEX, TMR_STEP, TMR_OFFSET, TMR_ORIGINAL, TMR_TAG, build7): New macros. (build7_stat, tree_mem_ref_addr, copy_mem_ref_info): Declare. * tree-ssa-ccp.c (fold_stmt_r): Call maybe_fold_tmr. * doc/c-tree.texi: Document TARGET_MEM_REF. * doc/tree-ssa.texi: Add TARGET_MEM_REF to gimple grammar. * gcc.dg/tree-ssa/loop-2.c: Update outcome. * gcc.dg/tree-ssa/loop-3.c: Update outcome. * gcc.dg/tree-ssa/loop-4.c: Update outcome. * gcc.dg/tree-ssa/loop-9.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100708 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index fd3e45d6781..0af98babc2d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1171,10 +1171,6 @@ struct tree_vec GTY(())
#define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
#define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.complexity)
-/* In INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF. */
-#define REF_ORIGINAL(NODE) TREE_CHAIN (TREE_CHECK3 (NODE, \
- INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF))
-
/* In a LOOP_EXPR node. */
#define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)
@@ -1240,6 +1236,15 @@ struct tree_vec GTY(())
#define CASE_HIGH(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 1)
#define CASE_LABEL(NODE) TREE_OPERAND (CASE_LABEL_EXPR_CHECK (NODE), 2)
+/* The operands of a TARGET_MEM_REF. */
+#define TMR_SYMBOL(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 0))
+#define TMR_BASE(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 1))
+#define TMR_INDEX(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 2))
+#define TMR_STEP(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 3))
+#define TMR_OFFSET(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 4))
+#define TMR_ORIGINAL(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 5))
+#define TMR_TAG(NODE) (TREE_OPERAND (TARGET_MEM_REF_CHECK (NODE), 6))
+
/* The operands of a BIND_EXPR. */
#define BIND_EXPR_VARS(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 0))
#define BIND_EXPR_BODY(NODE) (TREE_OPERAND (BIND_EXPR_CHECK (NODE), 1))
@@ -2897,6 +2902,10 @@ extern tree build3_stat (enum tree_code, tree, tree, tree, tree MEM_STAT_DECL);
extern tree build4_stat (enum tree_code, tree, tree, tree, tree,
tree MEM_STAT_DECL);
#define build4(c,t1,t2,t3,t4,t5) build4_stat (c,t1,t2,t3,t4,t5 MEM_STAT_INFO)
+extern tree build7_stat (enum tree_code, tree, tree, tree, tree, tree,
+ tree, tree, tree MEM_STAT_DECL);
+#define build7(c,t1,t2,t3,t4,t5,t6,t7,t8) \
+ build7_stat (c,t1,t2,t3,t4,t5,t6,t7,t8 MEM_STAT_INFO)
extern tree build_int_cst (tree, HOST_WIDE_INT);
extern tree build_int_cst_type (tree, HOST_WIDE_INT);
@@ -3990,4 +3999,8 @@ extern tree get_base_address (tree t);
/* In tree-vectorizer.c. */
extern void vect_set_verbosity_level (const char *);
+/* In tree-ssa-address.c. */
+extern tree tree_mem_ref_addr (tree, tree);
+extern void copy_mem_ref_info (tree, tree);
+
#endif /* GCC_TREE_H */