Remove individial dependence pointers and add a scop::dependence to contain all the dependence.
Removed the member variables which are only used in scop_get_dependence. Instead only maintaining the overall dependence. Passes regtest and bootstrap. gcc/ChangeLog: 2015-12-15 hiraditya <hiraditya@msn.com> * graphite-dependences.c (scop_get_dependences): Use local pointers. * graphite-isl-ast-to-gimple.c(translate_isl_ast_to_gimple::scop_to_isl_ast): Use scop->dependence. * graphite-optimize-isl.c (optimize_isl): Same. * graphite-poly.c (new_scop): Remove initialization of removed members. (free_scop): Same. * graphite.h (struct scop): Remove individial dependence pointers and add a scop::dependence to contain all the dependence. From-SVN: r231708
This commit is contained in:
parent
0ddb9c8d78
commit
0f7a02a32f
6 changed files with 63 additions and 69 deletions
|
@ -1,3 +1,14 @@
|
|||
2015-12-16 Aditya Kumar <aditya.k7@samsung.com>
|
||||
|
||||
* graphite-dependences.c (scop_get_dependences): Use local pointers.
|
||||
* graphite-isl-ast-to-gimple.c
|
||||
(translate_isl_ast_to_gimple::scop_to_isl_ast): Use scop->dependence.
|
||||
* graphite-optimize-isl.c (optimize_isl): Same.
|
||||
* graphite-poly.c (new_scop): Remove initialization of removed members.
|
||||
(free_scop): Same.
|
||||
* graphite.h (struct scop): Remove individial dependence pointers and
|
||||
add a scop::dependence to contain all the dependence.
|
||||
|
||||
2015-12-16 Aditya Kumar <aditya.k7@samsung.com>
|
||||
Sebastian Pop <s.pop@samsung.com>
|
||||
|
||||
|
|
|
@ -399,28 +399,32 @@ compute_deps (scop_p scop, vec<poly_bb_p> pbbs,
|
|||
isl_union_map *
|
||||
scop_get_dependences (scop_p scop)
|
||||
{
|
||||
isl_union_map *dependences;
|
||||
if (scop->dependence)
|
||||
return scop->dependence;
|
||||
|
||||
if (!scop->must_raw)
|
||||
compute_deps (scop, scop->pbbs,
|
||||
&scop->must_raw, &scop->may_raw,
|
||||
&scop->must_raw_no_source, &scop->may_raw_no_source,
|
||||
&scop->must_war, &scop->may_war,
|
||||
&scop->must_war_no_source, &scop->may_war_no_source,
|
||||
&scop->must_waw, &scop->may_waw,
|
||||
&scop->must_waw_no_source, &scop->may_waw_no_source);
|
||||
/* The original dependence relations:
|
||||
RAW are read after write dependences,
|
||||
WAR are write after read dependences,
|
||||
WAW are write after write dependences. */
|
||||
isl_union_map *must_raw = NULL, *may_raw = NULL, *must_raw_no_source = NULL,
|
||||
*may_raw_no_source = NULL, *must_war = NULL, *may_war = NULL,
|
||||
*must_war_no_source = NULL, *may_war_no_source = NULL, *must_waw = NULL,
|
||||
*may_waw = NULL, *must_waw_no_source = NULL, *may_waw_no_source = NULL;
|
||||
|
||||
dependences = isl_union_map_copy (scop->must_raw);
|
||||
dependences = isl_union_map_union (dependences,
|
||||
isl_union_map_copy (scop->must_war));
|
||||
dependences = isl_union_map_union (dependences,
|
||||
isl_union_map_copy (scop->must_waw));
|
||||
dependences = isl_union_map_union (dependences,
|
||||
isl_union_map_copy (scop->may_raw));
|
||||
dependences = isl_union_map_union (dependences,
|
||||
isl_union_map_copy (scop->may_war));
|
||||
dependences = isl_union_map_union (dependences,
|
||||
isl_union_map_copy (scop->may_waw));
|
||||
compute_deps (scop, scop->pbbs,
|
||||
&must_raw, &may_raw,
|
||||
&must_raw_no_source, &may_raw_no_source,
|
||||
&must_war, &may_war,
|
||||
&must_war_no_source, &may_war_no_source,
|
||||
&must_waw, &may_waw,
|
||||
&must_waw_no_source, &may_waw_no_source);
|
||||
|
||||
isl_union_map *dependences = must_raw;
|
||||
dependences = isl_union_map_union (dependences, must_war);
|
||||
dependences = isl_union_map_union (dependences, must_waw);
|
||||
dependences = isl_union_map_union (dependences, may_raw);
|
||||
dependences = isl_union_map_union (dependences, may_war);
|
||||
dependences = isl_union_map_union (dependences, may_waw);
|
||||
|
||||
if (dump_file)
|
||||
{
|
||||
|
@ -429,6 +433,14 @@ scop_get_dependences (scop_p scop)
|
|||
fprintf (dump_file, ")\n");
|
||||
}
|
||||
|
||||
isl_union_map_free (must_raw_no_source);
|
||||
isl_union_map_free (may_raw_no_source);
|
||||
isl_union_map_free (must_war_no_source);
|
||||
isl_union_map_free (may_war_no_source);
|
||||
isl_union_map_free (must_waw_no_source);
|
||||
isl_union_map_free (may_waw_no_source);
|
||||
|
||||
scop->dependence = dependences;
|
||||
return dependences;
|
||||
}
|
||||
|
||||
|
|
|
@ -3197,18 +3197,15 @@ translate_isl_ast_to_gimple::scop_to_isl_ast (scop_p scop, ivs_params &ip)
|
|||
isl_union_map *schedule_isl = generate_isl_schedule (scop);
|
||||
isl_ast_build *context_isl = generate_isl_context (scop);
|
||||
context_isl = set_options (context_isl, schedule_isl);
|
||||
isl_union_map *dependences = NULL;
|
||||
if (flag_loop_parallelize_all)
|
||||
{
|
||||
dependences = scop_get_dependences (scop);
|
||||
isl_union_map *dependence = scop_get_dependences (scop);
|
||||
context_isl =
|
||||
isl_ast_build_set_before_each_for (context_isl, ast_build_before_for,
|
||||
dependences);
|
||||
dependence);
|
||||
}
|
||||
isl_ast_node *ast_isl = isl_ast_build_ast_from_schedule (context_isl,
|
||||
schedule_isl);
|
||||
if (dependences)
|
||||
isl_union_map_free (dependences);
|
||||
isl_ast_build_free (context_isl);
|
||||
return ast_isl;
|
||||
}
|
||||
|
|
|
@ -380,12 +380,12 @@ optimize_isl (scop_p scop)
|
|||
isl_options_set_on_error (scop->isl_context, ISL_ON_ERROR_CONTINUE);
|
||||
|
||||
isl_union_set *domain = scop_get_domains (scop);
|
||||
isl_union_map *dependences = scop_get_dependences (scop);
|
||||
dependences
|
||||
= isl_union_map_gist_domain (dependences, isl_union_set_copy (domain));
|
||||
dependences
|
||||
= isl_union_map_gist_range (dependences, isl_union_set_copy (domain));
|
||||
isl_union_map *validity = dependences;
|
||||
scop_get_dependences (scop);
|
||||
scop->dependence
|
||||
= isl_union_map_gist_domain (scop->dependence, isl_union_set_copy (domain));
|
||||
scop->dependence
|
||||
= isl_union_map_gist_range (scop->dependence, isl_union_set_copy (domain));
|
||||
isl_union_map *validity = isl_union_map_copy (scop->dependence);
|
||||
isl_union_map *proximity = isl_union_map_copy (validity);
|
||||
|
||||
isl_options_set_schedule_max_constant_term (scop->isl_context, CONSTANT_BOUND);
|
||||
|
|
|
@ -295,26 +295,15 @@ scop_p
|
|||
new_scop (edge entry, edge exit)
|
||||
{
|
||||
sese_info_p region = new_sese_info (entry, exit);
|
||||
scop_p scop = XNEW (struct scop);
|
||||
scop_p s;
|
||||
s = XNEW (struct scop);
|
||||
|
||||
scop->param_context = NULL;
|
||||
scop->must_raw = NULL;
|
||||
scop->may_raw = NULL;
|
||||
scop->must_raw_no_source = NULL;
|
||||
scop->may_raw_no_source = NULL;
|
||||
scop->must_war = NULL;
|
||||
scop->may_war = NULL;
|
||||
scop->must_war_no_source = NULL;
|
||||
scop->may_war_no_source = NULL;
|
||||
scop->must_waw = NULL;
|
||||
scop->may_waw = NULL;
|
||||
scop->must_waw_no_source = NULL;
|
||||
scop->may_waw_no_source = NULL;
|
||||
scop_set_region (scop, region);
|
||||
scop->pbbs.create (3);
|
||||
scop->drs.create (3);
|
||||
|
||||
return scop;
|
||||
s->param_context = NULL;
|
||||
scop_set_region (s, region);
|
||||
s->pbbs.create (3);
|
||||
s->drs.create (3);
|
||||
s->dependence = NULL;
|
||||
return s;
|
||||
}
|
||||
|
||||
/* Deletes SCOP. */
|
||||
|
@ -335,18 +324,8 @@ free_scop (scop_p scop)
|
|||
scop->drs.release ();
|
||||
|
||||
isl_set_free (scop->param_context);
|
||||
isl_union_map_free (scop->must_raw);
|
||||
isl_union_map_free (scop->may_raw);
|
||||
isl_union_map_free (scop->must_raw_no_source);
|
||||
isl_union_map_free (scop->may_raw_no_source);
|
||||
isl_union_map_free (scop->must_war);
|
||||
isl_union_map_free (scop->may_war);
|
||||
isl_union_map_free (scop->must_war_no_source);
|
||||
isl_union_map_free (scop->may_war_no_source);
|
||||
isl_union_map_free (scop->must_waw);
|
||||
isl_union_map_free (scop->may_waw);
|
||||
isl_union_map_free (scop->must_waw_no_source);
|
||||
isl_union_map_free (scop->may_waw_no_source);
|
||||
isl_union_map_free (scop->dependence);
|
||||
scop->dependence = NULL;
|
||||
XDELETE (scop);
|
||||
}
|
||||
|
||||
|
|
|
@ -411,13 +411,8 @@ struct scop
|
|||
/* The context used internally by ISL. */
|
||||
isl_ctx *isl_context;
|
||||
|
||||
/* The original dependence relations:
|
||||
RAW are read after write dependences,
|
||||
WAR are write after read dependences,
|
||||
WAW are write after write dependences. */
|
||||
isl_union_map *must_raw, *may_raw, *must_raw_no_source, *may_raw_no_source,
|
||||
*must_war, *may_war, *must_war_no_source, *may_war_no_source,
|
||||
*must_waw, *may_waw, *must_waw_no_source, *may_waw_no_source;
|
||||
/* The data dependence relation among the data references in this scop. */
|
||||
isl_union_map *dependence;
|
||||
};
|
||||
|
||||
extern scop_p new_scop (edge, edge);
|
||||
|
|
Loading…
Add table
Reference in a new issue