summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog.graphite9
-rw-r--r--gcc/graphite-clast-to-gimple.c2
-rw-r--r--gcc/graphite-interchange.c2
-rw-r--r--gcc/graphite-poly.c4
-rw-r--r--gcc/graphite-poly.h8
-rw-r--r--gcc/graphite-sese-to-poly.c2
6 files changed, 22 insertions, 5 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index a49162a49a9..0122034d9bd 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,12 @@
+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>
* graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 5da15e06659..795bb6a678b 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -921,7 +921,7 @@ build_cloog_prog (scop_p scop, CloogProgram *prog)
continue;
/* 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));
cloog_statement_set_usr (stmt, pbb);
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
index 0a751d6336e..de05fcd2d2f 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -326,7 +326,7 @@ pbb_do_interchange (poly_bb_p pbb, scop_p scop)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
"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
/* Undo the transform. */
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index e06bb6dd835..142d3eda004 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -145,7 +145,7 @@ print_scattering_function (FILE *file, poly_bb_p pbb)
if (!PBB_TRANSFORMED (pbb))
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");
for (i = 0; i < pbb_nb_scattering_transform (pbb); i++)
@@ -579,7 +579,7 @@ debug_pdrs (poly_bb_p pbb)
void
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_cases (file, PBB_BLACK_BOX (pbb));
print_pdrs (file, pbb);
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index a96d5c20a8a..955f12f41b7 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -355,6 +355,14 @@ pbb_index (poly_bb_p pbb)
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. */
static inline scop_p
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 93574aa6ebb..057a0bdcfa4 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -1158,7 +1158,7 @@ create_linear_expr_from_tree (poly_bb_p pbb, tree t)
ppl_Linear_Expression_t res;
ppl_dimension_type dim;
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);
ppl_new_Linear_Expression_with_dimension (&res, dim);