re PR middle-end/42834 (memcpy folding overeager)
[platform/upstream/gcc.git] / gcc / tree-ssa-sccvn.h
index c8171c2..ba7fc5c 100644 (file)
 #ifndef TREE_SSA_SCCVN_H
 #define TREE_SSA_SCCVN_H
 
+/* In tree-ssa-sccvn.c  */
+bool expressions_equal_p (tree, tree);
+
+
 /* TOP of the VN lattice.  */
 extern tree VN_TOP;
 
@@ -68,6 +72,8 @@ typedef const struct vn_phi_s *const_vn_phi_t;
 typedef struct vn_reference_op_struct
 {
   enum tree_code opcode;
+  /* Constant offset this op adds or -1 if it is variable.  */
+  HOST_WIDE_INT off;
   tree type;
   tree op0;
   tree op1;
@@ -92,6 +98,8 @@ typedef struct vn_reference_s
   unsigned int value_id;
   hashval_t hashcode;
   tree vuse;
+  alias_set_type set;
+  tree type;
   VEC (vn_reference_op_s, heap) *operands;
   tree result;
 } *vn_reference_t;
@@ -161,7 +169,7 @@ typedef struct vn_ssa_aux
 extern vn_ssa_aux_t VN_INFO (tree);
 extern vn_ssa_aux_t VN_INFO_GET (tree);
 tree vn_get_expr_for (tree);
-bool run_scc_vn (bool);
+bool run_scc_vn (void);
 void free_scc_vn (void);
 tree vn_nary_op_lookup (tree, vn_nary_op_t *);
 tree vn_nary_op_lookup_stmt (gimple, vn_nary_op_t *);
@@ -177,13 +185,14 @@ void vn_reference_fold_indirect (VEC (vn_reference_op_s, heap) **,
                                 unsigned int *);
 void copy_reference_ops_from_ref (tree, VEC(vn_reference_op_s, heap) **);
 void copy_reference_ops_from_call (gimple, VEC(vn_reference_op_s, heap) **);
-tree get_ref_from_reference_ops (VEC(vn_reference_op_s, heap) *ops);
-tree vn_reference_lookup_pieces (tree,
+bool ao_ref_init_from_vn_reference (ao_ref *, alias_set_type, tree,
+                                   VEC (vn_reference_op_s, heap) *);
+tree vn_reference_lookup_pieces (tree, alias_set_type, tree,
                                 VEC (vn_reference_op_s, heap) *,
                                 vn_reference_t *, bool);
 tree vn_reference_lookup (tree, tree, bool, vn_reference_t *);
 vn_reference_t vn_reference_insert (tree, tree, tree);
-vn_reference_t vn_reference_insert_pieces (tree,
+vn_reference_t vn_reference_insert_pieces (tree, alias_set_type, tree,
                                           VEC (vn_reference_op_s, heap) *,
                                           tree, unsigned int);
 
@@ -197,4 +206,5 @@ unsigned int get_next_value_id (void);
 unsigned int get_constant_value_id (tree);
 unsigned int get_or_alloc_constant_value_id (tree);
 bool value_id_constant_p (unsigned int);
+tree fully_constant_vn_reference_p (vn_reference_t);
 #endif /* TREE_SSA_SCCVN_H  */