From: Aditya Kumar Date: Mon, 24 Aug 2015 20:53:51 +0000 (+0000) Subject: Specify the type of scop->region X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a611178d5a983c09fe176db336b986cbaa4d8a3;p=gcc.git Specify the type of scop->region 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 * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f88b730a90..84679e6499f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-08-24 Aditya Kumar + + * 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 * graphite-scop-detection.c (stmt_simple_for_scop_p): diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index dd4fcee1522..78b5d121fa2 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -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); diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 062d927411e..4ca5d1f8694 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -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 ); 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; } diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index fdcc790336c..0c97eba5190 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -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);