Commit 2a611178 by Aditya Kumar Committed by Sebastian Pop

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  <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
parent 9ead801e
2015-08-24 Aditya Kumar <aditya.k7@samsung.com> 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): * graphite-scop-detection.c (stmt_simple_for_scop_p):
Constrain only on INTEGER_TYPE. Constrain only on INTEGER_TYPE.
......
...@@ -422,7 +422,7 @@ debug_pdr (poly_dr_p pdr, int verbosity) ...@@ -422,7 +422,7 @@ debug_pdr (poly_dr_p pdr, int verbosity)
/* Creates a new SCOP containing REGION. */ /* Creates a new SCOP containing REGION. */
scop_p scop_p
new_scop (void *region) new_scop (sese region)
{ {
scop_p scop = XNEW (struct scop); scop_p scop = XNEW (struct scop);
......
...@@ -1345,7 +1345,7 @@ lst_remove_all_before_excluding_pbb (lst_p loop, poly_bb_p pbb, bool before) ...@@ -1345,7 +1345,7 @@ lst_remove_all_before_excluding_pbb (lst_p loop, poly_bb_p pbb, bool before)
struct scop struct scop
{ {
/* A SCOP is defined as a SESE region. */ /* A SCOP is defined as a SESE region. */
void *region; sese region;
/* Number of parameters in SCoP. */ /* Number of parameters in SCoP. */
graphite_dim_t nb_params; graphite_dim_t nb_params;
...@@ -1390,14 +1390,14 @@ struct scop ...@@ -1390,14 +1390,14 @@ struct scop
}; };
#define SCOP_BBS(S) (S->bbs) #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_CONTEXT(S) (NULL)
#define SCOP_ORIGINAL_SCHEDULE(S) (S->original_schedule) #define SCOP_ORIGINAL_SCHEDULE(S) (S->original_schedule)
#define SCOP_TRANSFORMED_SCHEDULE(S) (S->transformed_schedule) #define SCOP_TRANSFORMED_SCHEDULE(S) (S->transformed_schedule)
#define SCOP_SAVED_SCHEDULE(S) (S->saved_schedule) #define SCOP_SAVED_SCHEDULE(S) (S->saved_schedule)
#define POLY_SCOP_P(S) (S->poly_scop_p) #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_scop (scop_p);
extern void free_scops (vec<scop_p> ); extern void free_scops (vec<scop_p> );
extern void print_generated_program (FILE *, scop_p); extern void print_generated_program (FILE *, scop_p);
...@@ -1414,7 +1414,7 @@ extern bool graphite_legal_transform (scop_p); ...@@ -1414,7 +1414,7 @@ extern bool graphite_legal_transform (scop_p);
/* Set the region of SCOP to REGION. */ /* Set the region of SCOP to REGION. */
static inline void static inline void
scop_set_region (scop_p scop, void *region) scop_set_region (scop_p scop, sese region)
{ {
scop->region = region; scop->region = region;
} }
......
...@@ -604,7 +604,7 @@ extract_affine_chrec (scop_p s, tree e, __isl_take isl_space *space) ...@@ -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 *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_pw_aff *rhs = extract_affine (s, CHREC_RIGHT (e), isl_space_copy (space));
isl_local_space *ls = isl_local_space_from_space (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 *loop = isl_aff_set_coefficient_si
(isl_aff_zero_on_domain (ls), isl_dim_in, pos, 1); (isl_aff_zero_on_domain (ls), isl_dim_in, pos, 1);
isl_pw_aff *l = isl_pw_aff_from_aff (loop); isl_pw_aff *l = isl_pw_aff_from_aff (loop);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment