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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180864
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
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 ();
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;
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;
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;
static void
trans_constant_array_constructor (gfc_ss * ss, tree type)
{
- gfc_ss_info *info;
+ gfc_array_info *info;
tree tmp;
int i;
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;
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;
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;
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;
stmtblock_t * pblock)
{
tree stride;
- gfc_ss_info *info;
+ gfc_array_info *info;
gfc_ss *ss;
gfc_array_ref *ar;
int i;
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);
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;
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];
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;
static bool
transposed_dims (gfc_ss *ss)
{
- gfc_ss_info *info;
+ gfc_array_info *info;
int n;
info = &ss->data.info;
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;
gfc_ss *rss;
gfc_loopinfo loop;
gfc_loopinfo loop2;
- gfc_ss_info *info;
+ gfc_array_info *info;
tree offset;
tree tmp_index;
tree tmp;
tree fntype;
gfc_se parmse;
gfc_ss *argss;
- gfc_ss_info *info;
+ gfc_array_info *info;
int byref;
int parm_kind;
tree type;
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;
&& 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);
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;
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;
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. */
actual_dim = dim[loop_dim] */
int dim[GFC_MAX_DIMENSIONS];
}
-gfc_ss_info;
+gfc_array_info;
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;
}
temp;
/* All other types. */
- gfc_ss_info info;
+ gfc_array_info info;
}
data;