Commit d48e288d by Sebastian Pop Committed by Sebastian Pop

graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.

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

	* graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
	* graphite-interchange.c (pbb_do_interchange): Same.
	* graphite-poly.c (print_scattering_function): Same.
	(debug_pdrs): Same.
	* graphite-poly.h (pbb_loop): New.
	* graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.

From-SVN: r154557
parent d17286f6
2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
* graphite-interchange.c (pbb_do_interchange): Same.
* graphite-poly.c (print_scattering_function): Same.
(debug_pdrs): Same.
* graphite-poly.h (pbb_loop): New.
* graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2009-09-27 Sebastian Pop <sebastian.pop@amd.com> 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
* graphite-scop-detection.c (limit_scops): Do not build poly_bbs. * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
......
...@@ -921,7 +921,7 @@ build_cloog_prog (scop_p scop, CloogProgram *prog) ...@@ -921,7 +921,7 @@ build_cloog_prog (scop_p scop, CloogProgram *prog)
continue; continue;
/* Build the new statement and its block. */ /* Build the new statement and its block. */
stmt = cloog_statement_alloc (GBB_BB (PBB_BLACK_BOX (pbb))->index); stmt = cloog_statement_alloc (pbb_index (pbb));
block = cloog_block_alloc (stmt, 0, NULL, pbb_dim_iter_domain (pbb)); block = cloog_block_alloc (stmt, 0, NULL, pbb_dim_iter_domain (pbb));
cloog_statement_set_usr (stmt, pbb); cloog_statement_set_usr (stmt, pbb);
......
...@@ -326,7 +326,7 @@ pbb_do_interchange (poly_bb_p pbb, scop_p scop) ...@@ -326,7 +326,7 @@ pbb_do_interchange (poly_bb_p pbb, scop_p scop)
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, fprintf (dump_file,
"PBB %d: loops at depths %d and %d will be interchanged.\n", "PBB %d: loops at depths %d and %d will be interchanged.\n",
GBB_BB (PBB_BLACK_BOX (pbb))->index, (int) i, (int) j); pbb_index (pbb), (int) i, (int) j);
} }
else else
/* Undo the transform. */ /* Undo the transform. */
......
...@@ -145,7 +145,7 @@ print_scattering_function (FILE *file, poly_bb_p pbb) ...@@ -145,7 +145,7 @@ print_scattering_function (FILE *file, poly_bb_p pbb)
if (!PBB_TRANSFORMED (pbb)) if (!PBB_TRANSFORMED (pbb))
return; return;
fprintf (file, "scattering bb_%d (\n", GBB_BB (PBB_BLACK_BOX (pbb))->index); fprintf (file, "scattering bb_%d (\n", pbb_index (pbb));
fprintf (file, "# eq"); fprintf (file, "# eq");
for (i = 0; i < pbb_nb_scattering_transform (pbb); i++) for (i = 0; i < pbb_nb_scattering_transform (pbb); i++)
...@@ -579,7 +579,7 @@ debug_pdrs (poly_bb_p pbb) ...@@ -579,7 +579,7 @@ debug_pdrs (poly_bb_p pbb)
void void
print_pbb (FILE *file, poly_bb_p pbb) print_pbb (FILE *file, poly_bb_p pbb)
{ {
fprintf (file, "pbb_%d (\n", GBB_BB (PBB_BLACK_BOX (pbb))->index); fprintf (file, "pbb_%d (\n", pbb_index (pbb));
dump_gbb_conditions (file, PBB_BLACK_BOX (pbb)); dump_gbb_conditions (file, PBB_BLACK_BOX (pbb));
dump_gbb_cases (file, PBB_BLACK_BOX (pbb)); dump_gbb_cases (file, PBB_BLACK_BOX (pbb));
print_pdrs (file, pbb); print_pdrs (file, pbb);
......
...@@ -355,6 +355,14 @@ pbb_index (poly_bb_p pbb) ...@@ -355,6 +355,14 @@ pbb_index (poly_bb_p pbb)
return GBB_BB (PBB_BLACK_BOX (pbb))->index; return GBB_BB (PBB_BLACK_BOX (pbb))->index;
} }
/* The loop of the PBB. */
static inline loop_p
pbb_loop (poly_bb_p pbb)
{
return gbb_loop (PBB_BLACK_BOX (pbb));
}
/* The scop that contains the PDR. */ /* The scop that contains the PDR. */
static inline scop_p static inline scop_p
......
...@@ -1158,7 +1158,7 @@ create_linear_expr_from_tree (poly_bb_p pbb, tree t) ...@@ -1158,7 +1158,7 @@ create_linear_expr_from_tree (poly_bb_p pbb, tree t)
ppl_Linear_Expression_t res; ppl_Linear_Expression_t res;
ppl_dimension_type dim; ppl_dimension_type dim;
sese region = SCOP_REGION (PBB_SCOP (pbb)); sese region = SCOP_REGION (PBB_SCOP (pbb));
loop_p loop = GBB_BB (PBB_BLACK_BOX (pbb))->loop_father; loop_p loop = pbb_loop (pbb);
dim = pbb_dim_iter_domain (pbb) + pbb_nb_params (pbb); dim = pbb_dim_iter_domain (pbb) + pbb_nb_params (pbb);
ppl_new_Linear_Expression_with_dimension (&res, dim); ppl_new_Linear_Expression_with_dimension (&res, dim);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment