diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-11 19:35:41 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-11 19:35:41 +0000 |
commit | 7d3f584747c507ee30f69ba6f032d7e7dcd6b79c (patch) | |
tree | 04c4f68f06c094df9aae98b66d89ca341a444b4e /gcc/graphite.h | |
parent | 53e0412afceaac051f3e38a2c0f1060b7e9e915a (diff) | |
download | gcc-7d3f584747c507ee30f69ba6f032d7e7dcd6b79c.tar.gz |
2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38446
* graphite.c (register_bb_in_sese): New.
(bb_in_sese_p): Check if bb belongs to sese region by explicitly
looking at the bbs in the region.
* graphite.h (sese): Add region_basic_blocks pointer set to
structure and initialize at the time of defining new scop.
2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
(find_params_in_bb): Do not free data refs.
(free_graphite_bb): Add FIXME on disabled free_data_refs.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c (struct ivtype_map_elt): New.
(debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
gcc_type_for_cloog_iv): New.
(loop_iv_stack_patch_for_consts): Use the type of the induction
variable from the original loop, except for the automatically
generated loops, i.e., in the case of a strip-mined loop, in
which case there is no original loop: in that case just use
integer_type_node.
(new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
(free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
(clast_name_to_gcc): Accept params to be NULL.
(clast_to_gcc_expression): Take an extra parameter for the type.
Convert to that type all the expressions built by this function.
(gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
(graphite_translate_clast_equation): Compute the type of the
clast_equation before translating its LHS and RHS.
(clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
(graphite_create_new_loop): Compute the type of the induction
variable before translating the lower and upper bounds and before
creating the induction variable.
(rename_variables_from_edge, rename_phis_end_scop): New.
(copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
(sese_add_exit_phis_edge): Do not use integer_zero_node.
(find_cloog_iv_in_expr, compute_cloog_iv_types_1,
compute_cloog_iv_types): New.
(gloog): Call compute_cloog_iv_types before starting the
translation of the clast.
* graphite.h (struct graphite_bb): New field cloog_iv_types.
(GBB_CLOOG_IV_TYPES): New.
(debug_ivtype_map): Declared.
(oldiv_for_loop): New.
2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/38459
* graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
(param_index): Assert if parameter is not know after parameter
detection.
(find_params_in_bb): Detect params directly in GBB_CONDITIONS.
(find_scop_parameters): Mark, that we have finished parameter
detection.
(graphite_transform_loops): Move condition detection before parameter
detection.
* graphite.h (struct scop): Add SCOP_ADD_PARAMS.
2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
PR tree-optimization/38446
* gcc.dg/graphite/pr38446.c: New.
2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
* gcc.dg/graphite/scop-16.c: Test only scop specific info.
* gcc.dg/graphite/scop-17.c: Same.
* gcc.dg/graphite/block-5.c: New.
* gcc.dg/graphite/block-6.c: New.
* gcc.dg/graphite/pr37485.c: Clean dump file after.
* gcc.dg/graphite/pr37684.c: Same.
* gcc.dg/graphite/block-2.c: Same.
2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
PR middle-end/38459
* gfortran.dg/graphite/pr38459.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142688 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.h')
-rw-r--r-- | gcc/graphite.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gcc/graphite.h b/gcc/graphite.h index faae00950d6..92a68167f22 100644 --- a/gcc/graphite.h +++ b/gcc/graphite.h @@ -193,6 +193,7 @@ typedef struct graphite_bb lambda_vector compressed_alpha_matrix; CloogMatrix *dynamic_schedule; VEC (data_reference_p, heap) *data_refs; + htab_t cloog_iv_types; } *gbb_p; #define GBB_BB(GBB) GBB->bb @@ -205,6 +206,7 @@ typedef struct graphite_bb #define GBB_CONDITIONS(GBB) GBB->conditions #define GBB_CONDITION_CASES(GBB) GBB->condition_cases #define GBB_LOOPS(GBB) GBB->loops +#define GBB_CLOOG_IV_TYPES(GBB) GBB->cloog_iv_types /* Return the loop that contains the basic block GBB. */ @@ -274,10 +276,12 @@ DEF_VEC_ALLOC_P (name_tree, heap); typedef struct sese { edge entry, exit; + struct pointer_set_t *region_basic_blocks; } *sese; #define SESE_ENTRY(S) (S->entry) #define SESE_EXIT(S) (S->exit) +#define SESE_REGION_BBS(S) (S->region_basic_blocks) /* A SCOP is a Static Control Part of the program, simple enough to be represented in polyhedral form. */ @@ -327,6 +331,7 @@ struct scop but just a boundary. SCOP_ENTRY is considered part of the scop. */ #define SCOP_ENTRY(S) (SESE_ENTRY (SCOP_REGION (S))->dest) #define SCOP_EXIT(S) (SESE_EXIT (SCOP_REGION (S))->dest) +#define SCOP_REGION_BBS(S) (SESE_REGION_BBS (SCOP_REGION (S))) #define SCOP_STATIC_SCHEDULE(S) S->static_schedule #define SCOP_LOOPS(S) S->loops #define SCOP_LOOP_NEST(S) S->loop_nest @@ -345,7 +350,8 @@ extern void dot_scop (scop_p); extern void dot_all_scops (void); extern void debug_clast_stmt (struct clast_stmt *); extern void debug_rename_map (htab_t); -extern void debug_loop_vec (graphite_bb_p gb); +extern void debug_ivtype_map (htab_t); +extern void debug_loop_vec (graphite_bb_p); extern void debug_oldivs (scop_p); /* Describes the type of an iv stack entry. */ @@ -377,6 +383,25 @@ DEF_VEC_ALLOC_P(iv_stack_entry_p,heap); typedef VEC(iv_stack_entry_p, heap) **loop_iv_stack; extern void debug_loop_iv_stack (loop_iv_stack); +/* Return the old induction variable of the LOOP that is in normal + form in SCOP. */ + +static inline tree +oldiv_for_loop (scop_p scop, loop_p loop) +{ + int i; + name_tree iv; + + if (!loop) + return NULL_TREE; + + for (i = 0; VEC_iterate (name_tree, SCOP_OLDIVS (scop), i, iv); i++) + if (iv->loop == loop) + return iv->t; + + return NULL_TREE; +} + /* Return the number of gimple loops contained in SCOP. */ static inline int |