+2015-06-03 Bin Cheng <bin.cheng@arm.com>
+
+ * tree-ssa-loop-ivopts.c (dump_iv): New parameter.
+ (dump_use, dump_cand, find_induction_variables): Pass new argument
+ to dump_iv.
+ (record_use): Preserve the ssa name information in IV.
+
2015-06-03 Richard Sandiford <richard.sandiford@arm.com>
* genpreds.c (mark_mode_tests): Mark all MATCH_CODEs as
/* Dumps information about the induction variable IV to FILE. */
void
-dump_iv (FILE *file, struct iv *iv)
+dump_iv (FILE *file, struct iv *iv, bool dump_name)
{
- if (iv->ssa_name)
+ if (iv->ssa_name && dump_name)
{
fprintf (file, "ssa name ");
print_generic_expr (file, iv->ssa_name, TDF_SLIM);
print_generic_expr (file, *use->op_p, TDF_SLIM);
fprintf (file, "\n");
- dump_iv (file, use->iv);
+ dump_iv (file, use->iv, false);
if (use->related_cands)
{
break;
}
- dump_iv (file, iv);
+ dump_iv (file, iv, false);
}
/* Returns the info for ssa version VER. */
EXECUTE_IF_SET_IN_BITMAP (data->relevant, 0, i, bi)
{
if (ver_info (data, i)->iv)
- dump_iv (dump_file, ver_info (data, i)->iv);
+ dump_iv (dump_file, ver_info (data, i)->iv, true);
}
}
use->addr_base = addr_base;
use->addr_offset = addr_offset;
- /* To avoid showing ssa name in the dumps, if it was not reset by the
- caller. */
- iv->ssa_name = NULL_TREE;
-
data->iv_uses.safe_push (use);
return use;