trans.h (struct gfc_ss, [...]): Move field gfc_ss::useflags into gfc_ss_info.

* trans.h (struct gfc_ss, struct gfc_ss_info): Move field
	gfc_ss::useflags into gfc_ss_info.
	* trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
	gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
	Update reference chains.
	* trans-expr.c (gfc_conv_procedure_call): Ditto.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.

From-SVN: r180875
This commit is contained in:
Mikael Morin 2011-11-03 22:24:37 +00:00
parent c3b0bfe175
commit 7a412892a6
5 changed files with 25 additions and 12 deletions

View File

@ -1,3 +1,13 @@
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans.h (struct gfc_ss, struct gfc_ss_info): Move field
gfc_ss::useflags into gfc_ss_info.
* trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
Update reference chains.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
* trans.h (struct gfc_ss, struct gfc_ss_info): Move field

View File

@ -463,7 +463,7 @@ void
gfc_mark_ss_chain_used (gfc_ss * ss, unsigned flags)
{
for (; ss != gfc_ss_terminator; ss = ss->next)
ss->useflags = flags;
ss->info->useflags = flags;
}
static void gfc_free_ss (gfc_ss *);
@ -2906,7 +2906,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
{
ss_info = ss->info;
if ((ss->useflags & flag) == 0)
if ((ss_info->useflags & flag) == 0)
continue;
ss_type = ss_info->type;
@ -3148,7 +3148,7 @@ gfc_trans_scalarizing_loops (gfc_loopinfo * loop, stmtblock_t * body)
/* Clear all the used flags. */
for (ss = loop->ss; ss != gfc_ss_terminator; ss = ss->loop_chain)
ss->useflags = 0;
ss->info->useflags = 0;
}
@ -3185,7 +3185,7 @@ gfc_trans_scalarized_loop_boundary (gfc_loopinfo * loop, stmtblock_t * body)
ss_info = ss->info;
if ((ss->useflags & 2) == 0)
if ((ss_info->useflags & 2) == 0)
continue;
ss_type = ss_info->type;

View File

@ -2898,7 +2898,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
if (!sym->attr.elemental)
{
gcc_assert (se->ss->info->type == GFC_SS_FUNCTION);
if (se->ss->useflags)
if (se->ss->info->useflags)
{
gcc_assert ((!comp && gfc_return_by_reference (sym)
&& sym->result->attr.dimension)
@ -2983,7 +2983,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gfc_init_se (&parmse, se);
gfc_conv_derived_to_class (&parmse, e, fsym->ts);
}
else if (se->ss && se->ss->useflags)
else if (se->ss && se->ss->info->useflags)
{
/* An elemental function inside a scalarized loop. */
gfc_init_se (&parmse, se);

View File

@ -6634,7 +6634,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
break;
case GFC_ISYM_TRANSFER:
if (se->ss && se->ss->useflags)
if (se->ss && se->ss->info->useflags)
/* Access the previously obtained result. */
gfc_conv_tmp_array_ref (se);
else

View File

@ -209,6 +209,11 @@ typedef struct gfc_ss_info
gfc_array_info array;
}
data;
/* This is used by assignments requiring temporaries. The bits specify which
loops the terms appear in. This will be 1 for the RHS expressions,
2 for the LHS expressions, and 3(=1|2) for the temporary. */
unsigned useflags:2;
}
gfc_ss_info;
@ -237,11 +242,9 @@ typedef struct gfc_ss
struct gfc_ss *loop_chain;
struct gfc_ss *next;
/* This is used by assignments requiring temporaries. The bits specify which
loops the terms appear in. This will be 1 for the RHS expressions,
2 for the LHS expressions, and 3(=1|2) for the temporary. The bit
'where' suppresses precalculation of scalars in WHERE assignments. */
unsigned useflags:2, where:1, is_alloc_lhs:1;
/* The bit 'where' suppresses precalculation of scalars in WHERE assignments.
*/
unsigned where:1, is_alloc_lhs:1;
}
gfc_ss;
#define gfc_get_ss() XCNEW (gfc_ss)