Measure time spent in DD analysis and in code gen.

2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
	* graphite-dependences.c (graphite_legal_transform): Add time to
	TV_GRAPHITE_DATA_DEPS.
	(dependency_between_pbbs_p): Same.
	* timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.

From-SVN: r150683
This commit is contained in:
Sebastian Pop 2009-08-12 14:18:17 +00:00 committed by Sebastian Pop
parent 4c7af93945
commit 87d4d0ee25
7 changed files with 58 additions and 12 deletions

View File

@ -1,3 +1,11 @@
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
* graphite-dependences.c (graphite_legal_transform): Add time to
TV_GRAPHITE_DATA_DEPS.
(dependency_between_pbbs_p): Same.
* timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2009-08-12 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/41033

View File

@ -1,3 +1,15 @@
2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
* graphite-dependences.c (graphite_legal_transform): Add time to
TV_GRAPHITE_DATA_DEPS.
(dependency_between_pbbs_p): Same.
* timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
* Merge from mainline (r149952:150372).
2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
* ChangeLog.graphite: Fix indenting, white spaces and 80 columns.

View File

@ -571,12 +571,10 @@ fgraphite
Common Report Var(flag_graphite)
Enable in and out of Graphite representation
; This option is not documented as it does not perform any useful optimization.
fgraphite-identity
Common Report Var(flag_graphite_identity) Optimization
Enable Graphite Identity transformation
; This option is not documented as it will be removed
floop-parallelize-all
Common Report Var(flag_loop_parallelize_all) Optimization
Mark all loops as parallel

View File

@ -1160,7 +1160,11 @@ gloog (scop_p scop, htab_t bb_pbb_mapping)
sese region = SCOP_REGION (scop);
ifsese if_region = NULL;
htab_t rename_map, newivs_index;
cloog_prog_clast pc = scop_to_clast (scop);
cloog_prog_clast pc;
timevar_push (TV_GRAPHITE_CODE_GEN);
pc = scop_to_clast (scop);
if (dump_file && (dump_flags & TDF_DETAILS))
{
@ -1206,6 +1210,8 @@ gloog (scop_p scop, htab_t bb_pbb_mapping)
VEC_free (tree, heap, newivs);
cloog_clast_free (pc.stmt);
cloog_program_free (pc.prog);
timevar_pop (TV_GRAPHITE_CODE_GEN);
return true;
}

View File

@ -556,11 +556,17 @@ graphite_legal_transform (scop_p scop)
int i, j;
poly_bb_p pbb1, pbb2;
timevar_push (TV_GRAPHITE_DATA_DEPS);
for (i = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), i, pbb1); i++)
for (j = 0; VEC_iterate (poly_bb_p, SCOP_BBS (scop), j, pbb2); j++)
if (!graphite_legal_transform_bb (pbb1, pbb2))
return false;
{
timevar_pop (TV_GRAPHITE_DATA_DEPS);
return false;
}
timevar_pop (TV_GRAPHITE_DATA_DEPS);
return true;
}
@ -681,11 +687,17 @@ dependency_between_pbbs_p (poly_bb_p pbb1, poly_bb_p pbb2, int level)
int i, j;
poly_dr_p pdr1, pdr2;
timevar_push (TV_GRAPHITE_DATA_DEPS);
for (i = 0; VEC_iterate (poly_dr_p, PBB_DRS (pbb1), i, pdr1); i++)
for (j = 0; VEC_iterate (poly_dr_p, PBB_DRS (pbb2), j, pdr2); j++)
if (graphite_carried_dependence_level_k (pdr1, pdr2, level))
return true;
{
timevar_pop (TV_GRAPHITE_DATA_DEPS);
return true;
}
timevar_pop (TV_GRAPHITE_DATA_DEPS);
return false;
}

View File

@ -122,7 +122,9 @@ DEFTIMEVAR (TV_COMPLETE_UNROLL , "complete unrolling")
DEFTIMEVAR (TV_TREE_PARALLELIZE_LOOPS, "tree parallelize loops")
DEFTIMEVAR (TV_TREE_VECTORIZATION , "tree vectorization")
DEFTIMEVAR (TV_TREE_SLP_VECTORIZATION, "tree slp vectorization")
DEFTIMEVAR (TV_GRAPHITE_TRANSFORMS , "GRAPHITE loop transforms")
DEFTIMEVAR (TV_GRAPHITE_TRANSFORMS , "Graphite loop transforms")
DEFTIMEVAR (TV_GRAPHITE_DATA_DEPS , "Graphite data dep analysis")
DEFTIMEVAR (TV_GRAPHITE_CODE_GEN , "Graphite code generation")
DEFTIMEVAR (TV_TREE_LINEAR_TRANSFORM , "tree loop linear")
DEFTIMEVAR (TV_TREE_LOOP_DISTRIBUTION, "tree loop distribution")
DEFTIMEVAR (TV_CHECK_DATA_DEPS , "tree check data dependences")

View File

@ -1801,6 +1801,11 @@ parallelize_loops (void)
{
htab_empty (reduction_list);
/* If we use autopar in graphite pass, we use it's marked dependency
checking results. */
if (flag_loop_parallelize_all && !loop->can_be_parallel)
continue;
/* FIXME: Only consider innermost loops with just one exit. */
if (loop->inner || !single_dom_exit (loop))
continue;
@ -1811,19 +1816,22 @@ parallelize_loops (void)
/* FIXME: the check for vector phi nodes could be removed. */
|| loop_has_vector_phi_nodes (loop))
continue;
if (/* Do not bother with loops in cold areas. */
optimize_loop_nest_for_size_p (loop)
/* Or loops that roll too little. */
|| expected_loop_iterations (loop) <= n_threads)
/* FIXME: Bypass this check as graphite doesn't update the
count and frequency correctly now. */
if (!flag_loop_parallelize_all
&& (expected_loop_iterations (loop) <= n_threads
/* Do not bother with loops in cold areas. */
|| optimize_loop_nest_for_size_p (loop)))
continue;
if (!try_get_loop_niter (loop, &niter_desc))
continue;
if (!try_create_reduction_list (loop, reduction_list))
continue;
if (!loop_parallel_p (loop))
if (!flag_loop_parallelize_all && !loop_parallel_p (loop))
continue;
changed = true;