OSDN Git Service

2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Nov 2009 04:52:38 +0000 (04:52 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Nov 2009 04:52:38 +0000 (04:52 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154557 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.graphite
gcc/graphite-clast-to-gimple.c
gcc/graphite-interchange.c
gcc/graphite-poly.c
gcc/graphite-poly.h
gcc/graphite-sese-to-poly.c

index a49162a..0122034 100644 (file)
@@ -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.
index 5da15e0..795bb6a 100644 (file)
@@ -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);
 
index 0a751d6..de05fcd 100644 (file)
@@ -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.  */
index e06bb6d..142d3ed 100644 (file)
@@ -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);
index a96d5c2..955f12f 100644 (file)
@@ -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
index 93574aa..057a0bd 100644 (file)
@@ -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);