+2000-08-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * dependence.c (dependence_string, direction_string,
+ dump_one_node, dump_node_dependence): Hide unused identifiers.
+ (get_low_bound, normalize_coefficients): Match definition to
+ static prototype.
+ (get_one_coefficient): Initialize variables `value0_is_idx' and
+ `value1_is_idx'.
+ (ziv_test, gcd_test): Mark parameters with ATTRIBUTE_UNUSED.
+ (ziv_test): Delete variable `idx', use parameter `sub' instead.
+ (direction_merge): Avoid automatic aggregate initialization.
+ (have_dependence_p): Use `src' not `dest' to set `src_idx'.
+ Initialize variables `dest_idx' and `src_idx'.
+ (end_dependence_analysis): Avoid C89 style function definition.
+
2000-08-24 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c (time_char_table): Don't allow width with %F.
*/
enum dependence_type {flow, anti, output, none};
+#if 0
static const char * dependence_string [] = {"flow", "anti", "output", "none"};
-
+#endif
enum direction_type {lt, le, eq, gt, ge, star, independent, undef};
+#if 0
static const char * direction_string [] = {"<", "<=", "=", ">", ">=", "*",
"INDEPENDENT", "UNDEFINED"};
-
+#endif
enum def_use_type {def, use, init_def_use};
enum du_status_type {seen, unseen};
static void merge_dependencies PARAMS ((enum direction_type[][MAX_SUBSCRIPTS],
int[][MAX_SUBSCRIPTS], int, int));
static void dump_array_ref PARAMS ((tree));
+#if 0
static void dump_one_node PARAMS ((def_use*, varray_type*));
static void dump_node_dependence PARAMS ((void));
+#endif
int search_dependence PARAMS ((tree));
void remember_dest_for_dependence PARAMS ((tree));
int have_dependence_p PARAMS ((rtx, rtx, enum direction_type[], int[]));
/* Return the low bound for induction VARIABLE in NODE */
-int
+static int
get_low_bound (node, variable)
tree node;
char *variable;
}
else if (tree_op == MULT_EXPR)
{
- int value0, value1, value0_is_idx, value1_is_idx;
+ int value0, value1, value0_is_idx = 0, value1_is_idx = 0;
value0 = get_one_coefficient (TREE_OPERAND (node, 0), coefficients, du,
&tree_op_code);
/* Adjust the COEFFICIENTS as if loop LOOP_PTR were normalized to start at 0. */
-void
+static void
normalize_coefficients (coefficients, loop_ptr, count)
subscript coefficients [MAX_SUBSCRIPTS];
loop *loop_ptr;
subscript icoefficients [MAX_SUBSCRIPTS];
subscript ocoefficients [MAX_SUBSCRIPTS];
enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS];
- int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS];
+ int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS] ATTRIBUTE_UNUSED;
loop *loop_ptr;
int sub;
{
- int idx;
-
if (ocoefficients[sub].offset !=
icoefficients[sub].offset)
- direction[loop_ptr->depth][idx] = independent;
+ direction[loop_ptr->depth][sub] = independent;
}
/* Determine the DIRECTION and DISTANCE dependency for subscript SUB of
subscript icoefficients [MAX_SUBSCRIPTS];
subscript ocoefficients [MAX_SUBSCRIPTS];
enum direction_type direction[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS];
- int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS];
+ int distance[MAX_SUBSCRIPTS][MAX_SUBSCRIPTS] ATTRIBUTE_UNUSED;
loop *loop_ptr;
int sub;
{
int i, j;
int sign;
- enum direction_type direction_merge [8][8] =
+ static const enum direction_type direction_merge [8][8] =
{{lt, le, le, star, star, lt, independent, lt},
{le, le, le, star, star, le, independent, le},
{le, le, eq, ge, ge, eq, independent, eq},
/* Dump def/use DU. */
+#if 0
static void
dump_one_node (du, seen)
def_use *du;
}
VARRAY_FREE (seen);
}
+#endif
/* Return the index into 'dep_chain' if there is a dependency for destination
dest_to_remember (set by remember_dest_for_dependence) and source node.
enum direction_type direction[MAX_SUBSCRIPTS];
int distance[MAX_SUBSCRIPTS];
{
- int dest_idx, src_idx;
+ int dest_idx = 0, src_idx = 0;
rtx dest, src;
dependence *dep_ptr;
if (GET_CODE (SET_SRC (PATTERN (src_rtx))) == MEM)
{
src = SET_SRC (PATTERN (src_rtx));
- src_idx = MEM_DEPENDENCY (dest) - 1;
+ src_idx = MEM_DEPENDENCY (src) - 1;
}
if (dest_idx >= 0 || src_idx >= 0)
return 0;
/* Cleanup when dependency analysis is complete. */
void
-end_dependence_analysis (void)
+end_dependence_analysis ()
{
VARRAY_FREE (dep_chain);
}