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>
* 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
latter. Change argument type. Invert return value.
(gfc_conv_expr_descriptor): Update calls.
......
......@@ -517,7 +517,7 @@ gfc_ss *
gfc_get_array_ss (gfc_ss *next, gfc_expr *expr, int dimen, gfc_ss_type type)
{
gfc_ss *ss;
gfc_ss_info *info;
gfc_array_info *info;
int i;
ss = gfc_get_ss ();
......@@ -685,7 +685,7 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping,
static void
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 tmp;
......@@ -810,7 +810,7 @@ static int
get_array_ref_dim (gfc_ss *ss, int loop_dim)
{
int n, array_dim, array_ref_dim;
gfc_ss_info *info;
gfc_array_info *info;
info = &ss->data.info;
......@@ -845,7 +845,7 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post,
tree eltype, tree initial, bool dynamic,
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 type;
tree desc;
......@@ -1857,7 +1857,7 @@ gfc_build_constant_array_constructor (gfc_expr * expr, tree type)
static void
trans_constant_array_constructor (gfc_ss * ss, tree type)
{
gfc_ss_info *info;
gfc_array_info *info;
tree tmp;
int i;
......@@ -2099,7 +2099,7 @@ finish:
static void
set_vector_loop_bounds (gfc_loopinfo * loop, gfc_ss * ss)
{
gfc_ss_info *info;
gfc_array_info *info;
gfc_se se;
tree tmp;
tree desc;
......@@ -2516,7 +2516,7 @@ static tree
conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
gfc_array_ref * ar, tree stride)
{
gfc_ss_info *info;
gfc_array_info *info;
tree index;
tree desc;
tree data;
......@@ -2629,7 +2629,7 @@ conv_array_index_offset (gfc_se * se, gfc_ss * ss, int dim, int i,
static void
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 index;
tree tmp;
......@@ -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_se se;
gfc_ss_info *info;
gfc_array_info *info;
tree stride, index;
info = &ss->data.info;
......@@ -2854,7 +2854,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
stmtblock_t * pblock)
{
tree stride;
gfc_ss_info *info;
gfc_array_info *info;
gfc_ss *ss;
gfc_array_ref *ar;
int i;
......@@ -3205,7 +3205,7 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim)
gfc_expr *stride = NULL;
tree desc;
gfc_se se;
gfc_ss_info *info;
gfc_array_info *info;
gfc_array_ref *ar;
gcc_assert (ss->type == GFC_SS_SECTION);
......@@ -3356,7 +3356,7 @@ done:
tree end;
tree size[GFC_MAX_DIMENSIONS];
tree stride_pos, stride_neg, non_zerosized, tmp2, tmp3;
gfc_ss_info *info;
gfc_array_info *info;
char *msg;
int dim;
......@@ -3851,8 +3851,8 @@ void
gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
{
int n, dim, spec_dim;
gfc_ss_info *info;
gfc_ss_info *specinfo;
gfc_array_info *info;
gfc_array_info *specinfo;
gfc_ss *ss;
tree tmp;
gfc_ss *loopspec[GFC_MAX_DIMENSIONS];
......@@ -4061,7 +4061,7 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where)
tmp = loop->temp_ss->data.temp.type;
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->data.info.dimen = n;
......@@ -5661,7 +5661,7 @@ get_array_charlen (gfc_expr *expr, gfc_se *se)
static bool
transposed_dims (gfc_ss *ss)
{
gfc_ss_info *info;
gfc_array_info *info;
int n;
info = &ss->data.info;
......@@ -5704,7 +5704,7 @@ void
gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{
gfc_loopinfo loop;
gfc_ss_info *info;
gfc_array_info *info;
int need_tmp;
int n;
tree tmp;
......
......@@ -2359,7 +2359,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77,
gfc_ss *rss;
gfc_loopinfo loop;
gfc_loopinfo loop2;
gfc_ss_info *info;
gfc_array_info *info;
tree offset;
tree tmp_index;
tree tmp;
......@@ -2854,7 +2854,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
tree fntype;
gfc_se parmse;
gfc_ss *argss;
gfc_ss_info *info;
gfc_array_info *info;
int byref;
int parm_kind;
tree type;
......
......@@ -5269,7 +5269,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
gfc_actual_arglist *arg;
gfc_se argse;
gfc_ss *ss;
gfc_ss_info *info;
gfc_array_info *info;
stmtblock_t block;
int n;
bool scalar_mold;
......@@ -6757,7 +6757,7 @@ walk_inline_intrinsic_transpose (gfc_ss *ss, gfc_expr *expr)
&& tmp_ss->type != GFC_SS_REFERENCE)
{
int tmp_dim;
gfc_ss_info *info;
gfc_array_info *info;
info = &tmp_ss->data.info;
gcc_assert (info->dimen == 2);
......
......@@ -193,7 +193,7 @@ gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse,
gfc_loopinfo tmp_loop;
gfc_se parmse;
gfc_ss *ss;
gfc_ss_info *info;
gfc_array_info *info;
gfc_symbol *fsym;
gfc_ref *ref;
int n;
......@@ -3306,7 +3306,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_ss *lss, *rss;
gfc_se lse;
gfc_se rse;
gfc_ss_info *info;
gfc_array_info *info;
gfc_loopinfo loop;
tree desc;
tree parm;
......
......@@ -108,15 +108,10 @@ typedef enum
gfc_coarray_type;
/* 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_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. */
/* The array-specific scalarization informations. The array members of
this struct are indexed by actual array index, and thus can be sparse. */
typedef struct gfc_ss_info
typedef struct gfc_array_info
{
int dimen;
/* The ref that holds information on this section. */
......@@ -144,7 +139,7 @@ typedef struct gfc_ss_info
actual_dim = dim[loop_dim] */
int dim[GFC_MAX_DIMENSIONS];
}
gfc_ss_info;
gfc_array_info;
typedef enum
{
......@@ -190,8 +185,15 @@ typedef enum
}
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. */
typedef struct gfc_ss
{
gfc_ss_type type;
......@@ -217,7 +219,7 @@ typedef struct gfc_ss
}
temp;
/* All other types. */
gfc_ss_info info;
gfc_array_info info;
}
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