Specify the type of scop->region
authorAditya Kumar <aditya.k7@samsung.com>
Mon, 24 Aug 2015 20:53:51 +0000 (20:53 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Mon, 24 Aug 2015 20:53:51 +0000 (20:53 +0000)
Changing the type of scop::region from void* to sese, as this is
the only type assigned to scop::region for now. No functional changes intended.
Passes regtest and bootstrap.

gcc/ChangeLog:

2015-08-17  Aditya Kumar  <aditya.k7@samsung.com>

        * graphite-poly.c: Change type of region from void* to sese.
        * graphite-poly.h (struct scop): Changing the type of scop::region
from void* to sese. Change accessor macro accordingly.
        * graphite-sese-to-poly.c (extract_affine_chrec): Use accessor macro.

From-SVN: r227151

gcc/ChangeLog
gcc/graphite-poly.c
gcc/graphite-poly.h
gcc/graphite-sese-to-poly.c

index 0f88b73..84679e6 100644 (file)
@@ -1,5 +1,12 @@
 2015-08-24  Aditya Kumar  <aditya.k7@samsung.com>
 
+       * graphite-poly.c: Change type of region from void* to sese.
+       * graphite-poly.h (struct scop): Changing the type of scop::region
+       from void* to sese. Change accessor macro accordingly.
+       * graphite-sese-to-poly.c (extract_affine_chrec): Use accessor macro.
+
+2015-08-24  Aditya Kumar  <aditya.k7@samsung.com>
+
        * graphite-scop-detection.c (stmt_simple_for_scop_p):
        Constrain only on INTEGER_TYPE.
 
index dd4fcee..78b5d12 100644 (file)
@@ -422,7 +422,7 @@ debug_pdr (poly_dr_p pdr, int verbosity)
 /* Creates a new SCOP containing REGION.  */
 
 scop_p
-new_scop (void *region)
+new_scop (sese region)
 {
   scop_p scop = XNEW (struct scop);
 
index 062d927..4ca5d1f 100644 (file)
@@ -1345,7 +1345,7 @@ lst_remove_all_before_excluding_pbb (lst_p loop, poly_bb_p pbb, bool before)
 struct scop
 {
   /* A SCOP is defined as a SESE region.  */
-  void *region;
+  sese region;
 
   /* Number of parameters in SCoP.  */
   graphite_dim_t nb_params;
@@ -1390,14 +1390,14 @@ struct scop
 };
 
 #define SCOP_BBS(S) (S->bbs)
-#define SCOP_REGION(S) ((sese) S->region)
+#define SCOP_REGION(S) (S->region)
 #define SCOP_CONTEXT(S) (NULL)
 #define SCOP_ORIGINAL_SCHEDULE(S) (S->original_schedule)
 #define SCOP_TRANSFORMED_SCHEDULE(S) (S->transformed_schedule)
 #define SCOP_SAVED_SCHEDULE(S) (S->saved_schedule)
 #define POLY_SCOP_P(S) (S->poly_scop_p)
 
-extern scop_p new_scop (void *);
+extern scop_p new_scop (sese);
 extern void free_scop (scop_p);
 extern void free_scops (vec<scop_p> );
 extern void print_generated_program (FILE *, scop_p);
@@ -1414,7 +1414,7 @@ extern bool graphite_legal_transform (scop_p);
 /* Set the region of SCOP to REGION.  */
 
 static inline void
-scop_set_region (scop_p scop, void *region)
+scop_set_region (scop_p scop, sese region)
 {
   scop->region = region;
 }
index fdcc790..0c97eba 100644 (file)
@@ -604,7 +604,7 @@ extract_affine_chrec (scop_p s, tree e, __isl_take isl_space *space)
   isl_pw_aff *lhs = extract_affine (s, CHREC_LEFT (e), isl_space_copy (space));
   isl_pw_aff *rhs = extract_affine (s, CHREC_RIGHT (e), isl_space_copy (space));
   isl_local_space *ls = isl_local_space_from_space (space);
-  unsigned pos = sese_loop_depth ((sese) s->region, get_chrec_loop (e)) - 1;
+  unsigned pos = sese_loop_depth (SCOP_REGION (s), get_chrec_loop (e)) - 1;
   isl_aff *loop = isl_aff_set_coefficient_si
     (isl_aff_zero_on_domain (ls), isl_dim_in, pos, 1);
   isl_pw_aff *l = isl_pw_aff_from_aff (loop);