summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 13:18:16 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 13:18:16 +0000
commitf83623cc5a98293d1a649337efe310f572a065cf (patch)
tree63dd9ca1454b35898d9f0311c13337a73db0d703 /gcc/tree-data-ref.h
parentbcab8a3c1448981b4c53a8e03e1aa92530c63cd5 (diff)
downloadgcc-f83623cc5a98293d1a649337efe310f572a065cf.tar.gz
2012-06-04 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (struct rdg_vertex_info): Remove. (rdg_vertex_for_stmt): Simplify using gimple_uid. (create_rdg_vertices): Pass loop argument, remove stmt to RDG index hashtable. Record stmt data-references. (hash_stmt_vertex_info): Remove. (eq_stmt_vertex_info): Likewise. (hash_stmt_vertex_del): Likewise. (build_empty_rdg): Simplify. (build_rdg): Adjust. (free_rdg): Likewise. (ref_base_address): Remove. (have_similar_memory_accesses): Likewise. * tree-data-ref.h (create_rdg_vertices): Remove. (struct rdg_vertex): Add datarefs member. (RDGV_DATAREFS): New define. (RDG_DATAREFS): Likewise. (have_similar_memory_accesses): Remove. (rdg_has_similar_memory_accesses): Likewise. * tree-loop-distribution.c (ref_base_address): Re-implement here. (similar_memory_accesses): Re-implement using existing data-references. (tree_loop_distribution): Initialize stmt uids for the stmt to RDG index mapping. * tree-vect-loop.c (vect_create_epilog_for_reduction): Only access stmt vinfo for stmts in loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188180 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r--gcc/tree-data-ref.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index da4802ef4f2..2edddc03d44 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -403,7 +403,6 @@ extern bool compute_all_dependences (VEC (data_reference_p, heap) *,
extern tree find_data_references_in_bb (struct loop *, basic_block,
VEC (data_reference_p, heap) **);
-extern void create_rdg_vertices (struct graph *, VEC (gimple, heap) *);
extern bool dr_may_alias_p (const struct data_reference *,
const struct data_reference *, bool);
extern bool dr_equal_offsets_p (struct data_reference *,
@@ -525,6 +524,9 @@ typedef struct rdg_vertex
/* The statement represented by this vertex. */
gimple stmt;
+ /* Vector of data-references in this statement. */
+ VEC(data_reference_p, heap) *datarefs;
+
/* True when the statement contains a write to memory. */
bool has_mem_write;
@@ -533,9 +535,11 @@ typedef struct rdg_vertex
} *rdg_vertex_p;
#define RDGV_STMT(V) ((struct rdg_vertex *) ((V)->data))->stmt
+#define RDGV_DATAREFS(V) ((struct rdg_vertex *) ((V)->data))->datarefs
#define RDGV_HAS_MEM_WRITE(V) ((struct rdg_vertex *) ((V)->data))->has_mem_write
#define RDGV_HAS_MEM_READS(V) ((struct rdg_vertex *) ((V)->data))->has_mem_reads
#define RDG_STMT(RDG, I) RDGV_STMT (&(RDG->vertices[I]))
+#define RDG_DATAREFS(RDG, I) RDGV_DATAREFS (&(RDG->vertices[I]))
#define RDG_MEM_WRITE_STMT(RDG, I) RDGV_HAS_MEM_WRITE (&(RDG->vertices[I]))
#define RDG_MEM_READS_STMT(RDG, I) RDGV_HAS_MEM_READS (&(RDG->vertices[I]))
@@ -608,7 +612,6 @@ index_in_loop_nest (int var, VEC (loop_p, heap) *loop_nest)
void stores_from_loop (struct loop *, VEC (gimple, heap) **);
void stores_zero_from_loop (struct loop *, VEC (gimple, heap) **);
bool rdg_defs_used_in_other_loops_p (struct graph *, int);
-bool have_similar_memory_accesses (gimple, gimple);
bool stmt_with_adjacent_zero_store_dr_p (gimple);
/* Returns true when STRIDE is equal in absolute value to the size of
@@ -623,16 +626,6 @@ stride_of_unit_type_p (tree stride, tree type)
TYPE_SIZE_UNIT (type)));
}
-/* Determines whether RDG vertices V1 and V2 access to similar memory
- locations, in which case they have to be in the same partition. */
-
-static inline bool
-rdg_has_similar_memory_accesses (struct graph *rdg, int v1, int v2)
-{
- return have_similar_memory_accesses (RDG_STMT (rdg, v1),
- RDG_STMT (rdg, v2));
-}
-
/* In tree-data-ref.c */
void split_constant_offset (tree , tree *, tree *);