mirror of git://gcc.gnu.org/git/gcc.git
Add a new driver to data reference analysis.
2009-07-30 Sebastian Pop <sebastian.pop@amd.com> * tree-data-ref.c (graphite_find_data_references_in_stmt): New. * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared. From-SVN: r150297
This commit is contained in:
parent
a37d995a09
commit
ed91d6616c
|
@ -1,3 +1,8 @@
|
||||||
|
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
|
* tree-data-ref.c (graphite_find_data_references_in_stmt): New.
|
||||||
|
* tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
|
||||||
|
|
||||||
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
|
2009-07-30 Sebastian Pop <sebastian.pop@amd.com>
|
||||||
|
|
||||||
* tree-data-ref.c (debug_data_references): New.
|
* tree-data-ref.c (debug_data_references): New.
|
||||||
|
|
|
@ -4158,6 +4158,37 @@ find_data_references_in_stmt (struct loop *nest, gimple stmt,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Stores the data references in STMT to DATAREFS. If there is an unanalyzable
|
||||||
|
reference, returns false, otherwise returns true. NEST is the outermost
|
||||||
|
loop of the loop nest in which the references should be analyzed. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
graphite_find_data_references_in_stmt (struct loop *nest, gimple stmt,
|
||||||
|
VEC (data_reference_p, heap) **datarefs)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
VEC (data_ref_loc, heap) *references;
|
||||||
|
data_ref_loc *ref;
|
||||||
|
bool ret = true;
|
||||||
|
data_reference_p dr;
|
||||||
|
|
||||||
|
if (get_references_in_stmt (stmt, &references))
|
||||||
|
{
|
||||||
|
VEC_free (data_ref_loc, heap, references);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; VEC_iterate (data_ref_loc, references, i, ref); i++)
|
||||||
|
{
|
||||||
|
dr = create_data_ref (nest, *ref->pos, stmt, ref->is_read);
|
||||||
|
gcc_assert (dr != NULL);
|
||||||
|
VEC_safe_push (data_reference_p, heap, *datarefs, dr);
|
||||||
|
}
|
||||||
|
|
||||||
|
VEC_free (data_ref_loc, heap, references);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Search the data references in LOOP, and record the information into
|
/* Search the data references in LOOP, and record the information into
|
||||||
DATAREFS. Returns chrec_dont_know when failing to analyze a
|
DATAREFS. Returns chrec_dont_know when failing to analyze a
|
||||||
difficult case, returns NULL_TREE otherwise. */
|
difficult case, returns NULL_TREE otherwise. */
|
||||||
|
|
|
@ -405,6 +405,8 @@ extern void free_data_ref (data_reference_p);
|
||||||
extern void free_data_refs (VEC (data_reference_p, heap) *);
|
extern void free_data_refs (VEC (data_reference_p, heap) *);
|
||||||
extern bool find_data_references_in_stmt (struct loop *, gimple,
|
extern bool find_data_references_in_stmt (struct loop *, gimple,
|
||||||
VEC (data_reference_p, heap) **);
|
VEC (data_reference_p, heap) **);
|
||||||
|
extern bool graphite_find_data_references_in_stmt (struct loop *, gimple,
|
||||||
|
VEC (data_reference_p, heap) **);
|
||||||
struct data_reference *create_data_ref (struct loop *, tree, gimple, bool);
|
struct data_reference *create_data_ref (struct loop *, tree, gimple, bool);
|
||||||
extern bool find_loop_nest (struct loop *, VEC (loop_p, heap) **);
|
extern bool find_loop_nest (struct loop *, VEC (loop_p, heap) **);
|
||||||
extern void compute_all_dependences (VEC (data_reference_p, heap) *,
|
extern void compute_all_dependences (VEC (data_reference_p, heap) *,
|
||||||
|
|
Loading…
Reference in New Issue