From 8e4dc590c8878aaae1cdf5db6cbf84f8546b6511 Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Tue, 6 Oct 2015 15:56:03 +0000 Subject: Move declarations, assign types, renaming. 1. Move declarations near the assignment/usage. 2. Assign type to members which were void*. 3. Rename scop->context to scop::param_context, and scop::ctx to scop::isl_context No functional changes intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-10-05 Aditya Kumar * graphite-dependences.c (scop_get_reads): Renamed scop->context to scop->param_context. (scop_get_must_writes): Same. (scop_get_may_writes): Same. (scop_get_original_schedule): Same. (scop_get_transformed_schedule): Same. (subtract_commutative_associative_deps): Same. * graphite-isl-ast-to-gimple.c (add_parameters_to_ivs_params): Same. (generate_isl_context): Same. (generate_isl_schedule): Same. (scop_to_isl_ast): Same. (graphite_regenerate_ast_isl): Same. * graphite-optimize-isl.c (scop_get_domains): Same. (optimize_isl): Renamed scop->context to scop->param_context. * graphite-poly.c (new_poly_bb): Change the type of argument to gimple_poly_bb_p. (new_scop): Renamed scop->context to scop->param_context. (free_scop): Same. (print_scop_context): Same. * graphite-poly.h (new_poly_dr): Change the type of argument from void* to data_reference_p. (struct poly_bb): Change the type of black_box to gimple_poly_bb_p. (new_poly_bb): Change the type of argument from void* to gimple_poly_bb_p. (pbb_set_black_box): Same. (struct scop): Rename context to param_context, ctx to isl_context. * graphite-scop-detection.c (scop_detection::build_scop_bbs_1): Move declarations closer to assignment. (find_params_in_bb): Same. (find_scop_parameters): Same. * graphite-sese-to-poly.c (unsigned ssa_name_version_typesize): Global to be used for statement IDs. (isl_id_for_pbb): Use ssa_name_version_typesize. (simple_copy_phi_p): Move declarations closer to assignment. (build_pbb_scattering_polyhedrons): Same. (build_scop_scattering): Same. (isl_id_for_ssa_name): Same. (extract_affine_name): Same. (extract_affine_int): Same. (extract_affine): Same. (set_scop_parameter_dim): Use renamed member. (build_loop_iteration_domains): Same. (add_param_constraints): Same. (build_scop_iteration_domain): Same. (pdr_add_data_dimensions): Same. (build_poly_dr): Same. (build_scop_drs): Move declarations closer to assignment. (analyze_drs_in_stmts): Same. (insert_out_of_ssa_copy): Same. (insert_out_of_ssa_copy_on_edge): Same. (propagate_expr_outside_region): Same. (rewrite_phi_out_of_ssa): Same. (rewrite_degenerate_phi): Same. (rewrite_reductions_out_of_ssa): Same. (rewrite_cross_bb_scalar_dependence): Same. (handle_scalar_deps_crossing_scop_limits): Same. (rewrite_cross_bb_scalar_deps): Same. * graphite.c (graphite_transform_loops): Use renamed member. From-SVN: r228528 --- gcc/graphite-poly.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc/graphite-poly.h') diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index c404b42..3618b66 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -59,7 +59,7 @@ struct poly_dr int nb_refs; /* A pointer to compiler's data reference description. */ - void *compiler_dr; + data_reference_p compiler_dr; /* A pointer to the PBB that contains this data reference. */ poly_bb_p pbb; @@ -199,7 +199,7 @@ struct poly_dr #define PDR_BASE_OBJECT_SET(PDR) (PDR->dr_base_object_set) #define PDR_NB_SUBSCRIPTS(PDR) (PDR->nb_subscripts) -void new_poly_dr (poly_bb_p, int, enum poly_dr_type, void *, +void new_poly_dr (poly_bb_p, int, enum poly_dr_type, data_reference_p, graphite_dim_t, isl_map *, isl_set *); void free_poly_dr (poly_dr_p); void debug_pdr (poly_dr_p, int); @@ -232,7 +232,7 @@ pdr_may_write_p (poly_dr_p pdr) struct poly_bb { /* Pointer to a basic block or a statement in the compiler. */ - void *black_box; + gimple_poly_bb_p black_box; /* Pointer to the SCOP containing this PBB. */ scop_p scop; @@ -282,7 +282,7 @@ struct poly_bb #define PBB_DRS(PBB) (PBB->drs) #define PBB_IS_REDUCTION(PBB) (PBB->is_reduction) -extern poly_bb_p new_poly_bb (scop_p, void *); +extern poly_bb_p new_poly_bb (scop_p, gimple_poly_bb_p); extern void free_poly_bb (poly_bb_p); extern void debug_loop_vec (poly_bb_p); extern void print_pbb_domain (FILE *, poly_bb_p, int); @@ -366,7 +366,7 @@ pdr_scop (poly_dr_p pdr) /* Set black box of PBB to BLACKBOX. */ static inline void -pbb_set_black_box (poly_bb_p pbb, void *black_box) +pbb_set_black_box (poly_bb_p pbb, gimple_poly_bb_p black_box) { pbb->black_box = black_box; } @@ -399,10 +399,10 @@ struct scop -128 >= a >= 127 0 >= b >= 65,535 c = 2a + b */ - isl_set *context; + isl_set *param_context; /* The context used internally by ISL. */ - isl_ctx *ctx; + isl_ctx *isl_context; /* The original dependence relations: RAW are read after write dependences, -- cgit v1.1