Commit 6d63e468 by Mikael Morin

trans.h (struct gfc_ss_info, [...]): Rename the former to the latter.

	* trans.h (struct gfc_ss_info, struct gfc_array_info):
	Rename the former to the latter.
	* trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
	get_array_ref_dim, gfc_trans_create_temp_array,
	gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
	gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
	add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
	gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
	gfc_conv_expr_descriptor): Update all uses.
	* trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
	Ditto.
	* trans-intrinsic.c (gfc_conv_intrinsic_transfer,
	walk_inline_intrinsic_transpose): Ditto.
	* trans-stmt.c (gfc_conv_elemental_dependencies,
	gfc_trans_pointer_assign_need_temp): Ditto.

From-SVN: r180864
parent a7fb208d
2011-11-03 Mikael Morin <mikael@gcc.gnu.org> 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans.h (struct gfc_ss_info, struct gfc_array_info):
Rename the former to the latter.
* trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
get_array_ref_dim, gfc_trans_create_temp_array,
gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
gfc_conv_expr_descriptor): Update all uses.
* trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer,
walk_inline_intrinsic_transpose): Ditto.
* trans-stmt.c (gfc_conv_elemental_dependencies,
gfc_trans_pointer_assign_need_temp): Ditto.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (dim_ok, transposed_dims): Rename the former to the * trans-array.c (dim_ok, transposed_dims): Rename the former to the
latter. Change argument type. Invert return value. latter. Change argument type. Invert return value.
(gfc_conv_expr_descriptor): Update calls. (gfc_conv_expr_descriptor): Update calls.
......
...@@ -517,7 +517,7 @@ gfc_ss * ...@@ -517,7 +517,7 @@ gfc_ss *
gfc_get_array_ss (gfc_ss *next, gfc_expr *expr, int dimen, gfc_ss_type type) gfc_get_array_ss (gfc_ss *next, gfc_expr *expr, int dimen, gfc_ss_type type)
{ {
gfc_ss *ss; gfc_ss *ss;
gfc_ss_info *info; gfc_array_info *info;
int i; int i;
ss = gfc_get_ss (); ss = gfc_get_ss ();
...@@ -685,7 +685,7 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping, ...@@ -685,7 +685,7 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping,
static void static void
gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post, gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post,
gfc_ss_info * info, tree size, tree nelem, gfc_array_info * info, tree size, tree nelem,
tree initial, bool dynamic, bool dealloc) tree initial, bool dynamic, bool dealloc)
{ {
tree tmp; tree tmp;
...@@ -810,7 +810,7 @@ static int ...@@ -810,7 +810,7 @@ static int
get_array_ref_dim (gfc_ss *ss, int loop_dim) get_array_ref_dim (gfc_ss *ss, int loop_dim)
{ {
int n, array_dim, array_ref_dim; int n, array_dim, array_ref_dim;
gfc_ss_info *info; gfc_array_info *info;
info = &ss->data.info; info = &ss->data.info;
...@@ -845,7 +845,7 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, ...@@ -845,7 +845,7 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post,
tree eltype, tree initial, bool dynamic, tree eltype, tree initial, bool dynamic,
bool dealloc, bool callee_alloc, locus * where) bool dealloc, bool callee_alloc, locus * where)
{ {
gfc_ss_info *info; gfc_array_info *info;
tree from[GFC_MAX_DIMENSIONS], to[GFC_MAX_DIMENSIONS]; tree from[GFC_MAX_DIMENSIONS], to[GFC_MAX_DIMENSIONS];
tree type; tree type;
tree desc; tree desc;
...@@ -1857,7 +1857,7 @@ gfc_build_constant_array_constructor (gfc_expr * expr, tree type) ...@@ -1857,7 +1857,7 @@ gfc_build_constant_array_constructor (gfc_expr * expr, tree type)
static void static void
trans_constant_array_constructor (gfc_ss * ss, tree type) trans_constant_array_constructor (gfc_ss * ss, tree type)
{ {
gfc_ss_info *info; gfc_array_info *info;
tree tmp; tree tmp;
int i; int i;
...@@ -2099,7 +2099,7 @@ finish: ...@@ -2099,7 +2099,7 @@ finish:
static void static void
set_vector_loop_bounds (gfc_loopinfo * loop, gfc_ss * ss) set_vector_loop_bounds (gfc_loopinfo * loop, gfc_ss * ss)
{ {
gfc_ss_info *info; gfc_array_info *info;
gfc_se se; gfc_se se;
tree tmp; tree tmp;
tree desc; tree desc;
...@@ -2516,7 +2516,7 @@ static tree ...@@ -2516,7 +2516,7 @@ static tree
conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i, conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
gfc_array_ref * ar, tree stride) gfc_array_ref * ar, tree stride)
{ {
gfc_ss_info *info; gfc_array_info *info;
tree index; tree index;
tree desc; tree desc;
tree data; tree data;
...@@ -2629,7 +2629,7 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i, ...@@ -2629,7 +2629,7 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
static void static void
gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar) gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar)
{ {
gfc_ss_info *info; gfc_array_info *info;
tree decl = NULL_TREE; tree decl = NULL_TREE;
tree index; tree index;
tree tmp; tree tmp;
...@@ -2827,7 +2827,7 @@ add_array_offset (stmtblock_t *pblock, gfc_loopinfo *loop, gfc_ss *ss, ...@@ -2827,7 +2827,7 @@ add_array_offset (stmtblock_t *pblock, gfc_loopinfo *loop, gfc_ss *ss,
gfc_array_ref *ar, int array_dim, int loop_dim) gfc_array_ref *ar, int array_dim, int loop_dim)
{ {
gfc_se se; gfc_se se;
gfc_ss_info *info; gfc_array_info *info;
tree stride, index; tree stride, index;
info = &ss->data.info; info = &ss->data.info;
...@@ -2854,7 +2854,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag, ...@@ -2854,7 +2854,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
stmtblock_t * pblock) stmtblock_t * pblock)
{ {
tree stride; tree stride;
gfc_ss_info *info; gfc_array_info *info;
gfc_ss *ss; gfc_ss *ss;
gfc_array_ref *ar; gfc_array_ref *ar;
int i; int i;
...@@ -3205,7 +3205,7 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim) ...@@ -3205,7 +3205,7 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim)
gfc_expr *stride = NULL; gfc_expr *stride = NULL;
tree desc; tree desc;
gfc_se se; gfc_se se;
gfc_ss_info *info; gfc_array_info *info;
gfc_array_ref *ar; gfc_array_ref *ar;
gcc_assert (ss->type == GFC_SS_SECTION); gcc_assert (ss->type == GFC_SS_SECTION);
...@@ -3356,7 +3356,7 @@ done: ...@@ -3356,7 +3356,7 @@ done:
tree end; tree end;
tree size[GFC_MAX_DIMENSIONS]; tree size[GFC_MAX_DIMENSIONS];
tree stride_pos, stride_neg, non_zerosized, tmp2, tmp3; tree stride_pos, stride_neg, non_zerosized, tmp2, tmp3;
gfc_ss_info *info; gfc_array_info *info;
char *msg; char *msg;
int dim; int dim;
...@@ -3851,8 +3851,8 @@ void ...@@ -3851,8 +3851,8 @@ void
gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
{ {
int n, dim, spec_dim; int n, dim, spec_dim;
gfc_ss_info *info; gfc_array_info *info;
gfc_ss_info *specinfo; gfc_array_info *specinfo;
gfc_ss *ss; gfc_ss *ss;
tree tmp; tree tmp;
gfc_ss *loopspec[GFC_MAX_DIMENSIONS]; gfc_ss *loopspec[GFC_MAX_DIMENSIONS];
...@@ -4061,7 +4061,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) ...@@ -4061,7 +4061,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
tmp = loop->temp_ss->data.temp.type; tmp = loop->temp_ss->data.temp.type;
n = loop->temp_ss->data.temp.dimen; n = loop->temp_ss->data.temp.dimen;
memset (&loop->temp_ss->data.info, 0, sizeof (gfc_ss_info)); memset (&loop->temp_ss->data.info, 0, sizeof (gfc_array_info));
loop->temp_ss->type = GFC_SS_SECTION; loop->temp_ss->type = GFC_SS_SECTION;
loop->temp_ss->data.info.dimen = n; loop->temp_ss->data.info.dimen = n;
...@@ -5661,7 +5661,7 @@ get_array_charlen (gfc_expr *expr, gfc_se *se) ...@@ -5661,7 +5661,7 @@ get_array_charlen (gfc_expr *expr, gfc_se *se)
static bool static bool
transposed_dims (gfc_ss *ss) transposed_dims (gfc_ss *ss)
{ {
gfc_ss_info *info; gfc_array_info *info;
int n; int n;
info = &ss->data.info; info = &ss->data.info;
...@@ -5704,7 +5704,7 @@ void ...@@ -5704,7 +5704,7 @@ void
gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{ {
gfc_loopinfo loop; gfc_loopinfo loop;
gfc_ss_info *info; gfc_array_info *info;
int need_tmp; int need_tmp;
int n; int n;
tree tmp; tree tmp;
......
...@@ -2359,7 +2359,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77, ...@@ -2359,7 +2359,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
gfc_ss *rss; gfc_ss *rss;
gfc_loopinfo loop; gfc_loopinfo loop;
gfc_loopinfo loop2; gfc_loopinfo loop2;
gfc_ss_info *info; gfc_array_info *info;
tree offset; tree offset;
tree tmp_index; tree tmp_index;
tree tmp; tree tmp;
...@@ -2854,7 +2854,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, ...@@ -2854,7 +2854,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
tree fntype; tree fntype;
gfc_se parmse; gfc_se parmse;
gfc_ss *argss; gfc_ss *argss;
gfc_ss_info *info; gfc_array_info *info;
int byref; int byref;
int parm_kind; int parm_kind;
tree type; tree type;
......
...@@ -5269,7 +5269,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) ...@@ -5269,7 +5269,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
gfc_actual_arglist *arg; gfc_actual_arglist *arg;
gfc_se argse; gfc_se argse;
gfc_ss *ss; gfc_ss *ss;
gfc_ss_info *info; gfc_array_info *info;
stmtblock_t block; stmtblock_t block;
int n; int n;
bool scalar_mold; bool scalar_mold;
...@@ -6757,7 +6757,7 @@ walk_inline_intrinsic_transpose (gfc_ss *ss, gfc_expr *expr) ...@@ -6757,7 +6757,7 @@ walk_inline_intrinsic_transpose (gfc_ss *ss, gfc_expr *expr)
&& tmp_ss->type != GFC_SS_REFERENCE) && tmp_ss->type != GFC_SS_REFERENCE)
{ {
int tmp_dim; int tmp_dim;
gfc_ss_info *info; gfc_array_info *info;
info = &tmp_ss->data.info; info = &tmp_ss->data.info;
gcc_assert (info->dimen == 2); gcc_assert (info->dimen == 2);
......
...@@ -193,7 +193,7 @@ gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse, ...@@ -193,7 +193,7 @@ gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse,
gfc_loopinfo tmp_loop; gfc_loopinfo tmp_loop;
gfc_se parmse; gfc_se parmse;
gfc_ss *ss; gfc_ss *ss;
gfc_ss_info *info; gfc_array_info *info;
gfc_symbol *fsym; gfc_symbol *fsym;
gfc_ref *ref; gfc_ref *ref;
int n; int n;
...@@ -3306,7 +3306,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2, ...@@ -3306,7 +3306,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_ss *lss, *rss; gfc_ss *lss, *rss;
gfc_se lse; gfc_se lse;
gfc_se rse; gfc_se rse;
gfc_ss_info *info; gfc_array_info *info;
gfc_loopinfo loop; gfc_loopinfo loop;
tree desc; tree desc;
tree parm; tree parm;
......
...@@ -108,15 +108,10 @@ typedef enum ...@@ -108,15 +108,10 @@ typedef enum
gfc_coarray_type; gfc_coarray_type;
/* Scalarization State chain. Created by walking an expression tree before /* The array-specific scalarization informations. The array members of
creating the scalarization loops. Then passed as part of a gfc_se structure this struct are indexed by actual array index, and thus can be sparse. */
to translate the expression inside the loop. Note that these chains are
terminated by gfc_se_terminator, not NULL. A NULL pointer in a gfc_se
indicates to gfc_conv_* that this is a scalar expression.
Note that some member arrays correspond to scalarizer rank and others
are the variable rank. */
typedef struct gfc_ss_info typedef struct gfc_array_info
{ {
int dimen; int dimen;
/* The ref that holds information on this section. */ /* The ref that holds information on this section. */
...@@ -144,7 +139,7 @@ typedef struct gfc_ss_info ...@@ -144,7 +139,7 @@ typedef struct gfc_ss_info
actual_dim = dim[loop_dim] */ actual_dim = dim[loop_dim] */
int dim[GFC_MAX_DIMENSIONS]; int dim[GFC_MAX_DIMENSIONS];
} }
gfc_ss_info; gfc_array_info;
typedef enum typedef enum
{ {
...@@ -190,8 +185,15 @@ typedef enum ...@@ -190,8 +185,15 @@ typedef enum
} }
gfc_ss_type; gfc_ss_type;
/* SS structures can only belong to a single loopinfo. They must be added
/* Scalarization State chain. Created by walking an expression tree before
creating the scalarization loops. Then passed as part of a gfc_se structure
to translate the expression inside the loop. Note that these chains are
terminated by gfc_ss_terminator, not NULL. A NULL pointer in a gfc_se
indicates to gfc_conv_* that this is a scalar expression.
SS structures can only belong to a single loopinfo. They must be added
otherwise they will not get freed. */ otherwise they will not get freed. */
typedef struct gfc_ss typedef struct gfc_ss
{ {
gfc_ss_type type; gfc_ss_type type;
...@@ -217,7 +219,7 @@ typedef struct gfc_ss ...@@ -217,7 +219,7 @@ typedef struct gfc_ss
} }
temp; temp;
/* All other types. */ /* All other types. */
gfc_ss_info info; gfc_array_info info;
} }
data; data;
......
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