+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):
/* Creates a new SCOP containing REGION. */
scop_p
-new_scop (void *region)
+new_scop (sese region)
{
scop_p scop = XNEW (struct scop);
struct scop
{
/* A SCOP is defined as a SESE region. */
- void *region;
+ sese region;
/* Number of parameters in SCoP. */
graphite_dim_t nb_params;
};
#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);
/* 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;
}
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);