typedef struct gfc_ss_info
{
+ int refcount;
gfc_ss_type type;
gfc_expr *expr;
tree string_length;
tree type;
}
temp;
+
+ /* All other types. */
+ 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;
+
+ /* Suppresses precalculation of scalars in WHERE assignments. */
+ unsigned where:1;
}
gfc_ss_info;
{
gfc_ss_info *info;
- union
- {
- /* All other types. */
- gfc_array_info info;
- }
- data;
-
int dimen;
/* Translation from loop dimensions to actual array dimensions.
actual_dim = dim[loop_dim] */
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;
+ /* Non-null if the ss is part of a nested loop. */
+ struct gfc_ss *parent;
+
+ /* If the evaluation of an expression requires a nested loop (for example
+ if the sum intrinsic is evaluated inline), this points to the nested
+ loop's gfc_ss. */
+ struct gfc_ss *nested_ss;
+
+ /* The loop this gfc_ss is in. */
+ struct gfc_loopinfo *loop;
+
+ unsigned is_alloc_lhs:1;
}
gfc_ss;
#define gfc_get_ss() XCNEW (gfc_ss)
/* The SS describing the temporary used in an assignment. */
gfc_ss *temp_ss;
+ /* Non-null if this loop is nested in another one. */
+ struct gfc_loopinfo *parent;
+
+ /* Chain of nested loops. */
+ struct gfc_loopinfo *nested, *next;
+
/* The scalarization loop index variables. */
tree loopvar[GFC_MAX_DIMENSIONS];
tree gfc_conv_intrinsic_subroutine (gfc_code *);
void gfc_conv_intrinsic_function (gfc_se *, gfc_expr *);
-/* Is the intrinsic expanded inline. */
-bool gfc_inline_intrinsic_function_p (gfc_expr *);
-
/* Does an intrinsic map directly to an external library call
This is true for array-returning intrinsics, unless
gfc_inline_intrinsic_function_p returns true. */