+2016-06-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * ifcvt.c (struct noce_if_info): Add transform_name field.
+ (noce_try_move): Set if_info->transform_name to the function name.
+ (noce_try_ifelse_collapse): Likewise.
+ (noce_try_store_flag): Likewise.
+ (noce_try_inverse_constants): Likewise.
+ (noce_try_store_flag_constants): Likewise.
+ (noce_try_addcc): Likewise.
+ (noce_try_store_flag_mask): Likewise.
+ (noce_try_cmove): Likewise.
+ (noce_try_cmove_arith): Likewise.
+ (noce_try_minmax): Likewise.
+ (noce_try_abs): Likewise.
+ (noce_try_sign_mask): Likewise.
+ (noce_try_bitop): Likewise.
+ (noce_convert_multiple_sets): Likewise.
+ (noce_process_if_block): Print if_info->transform_name to
+ dump_file if transformation succeeded.
+
2016-06-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/cortex-a57.md (cortex_a57_alu):
/* Estimated cost of the particular branch instruction. */
unsigned int branch_cost;
+
+ /* The name of the noce transform that succeeded in if-converting
+ this structure. Used for debugging. */
+ const char *transform_name;
};
static rtx noce_emit_store_flag (struct noce_if_info *, rtx, int, int);
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
}
+ if_info->transform_name = "noce_try_move";
return TRUE;
}
return FALSE;
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+
+ if_info->transform_name = "noce_try_ifelse_collapse";
return TRUE;
}
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_store_flag";
return TRUE;
}
else
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_inverse_constants";
return true;
}
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_store_flag_constants";
+
return TRUE;
}
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_addcc";
+
return TRUE;
}
end_sequence ();
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_addcc";
return TRUE;
}
end_sequence ();
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_store_flag_mask";
+
return TRUE;
}
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_cmove";
+
return TRUE;
}
/* If both a and b are constants try a last-ditch transformation:
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_cmove";
return TRUE;
}
else
emit_insn_before_setloc (ifcvt_seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_cmove_arith";
return TRUE;
end_seq_and_fail:
emit_insn_before_setloc (seq, if_info->jump, INSN_LOCATION (if_info->insn_a));
if_info->cond = cond;
if_info->cond_earliest = earliest;
+ if_info->transform_name = "noce_try_minmax";
return TRUE;
}
emit_insn_before_setloc (seq, if_info->jump, INSN_LOCATION (if_info->insn_a));
if_info->cond = cond;
if_info->cond_earliest = earliest;
+ if_info->transform_name = "noce_try_abs";
return TRUE;
}
return FALSE;
emit_insn_before_setloc (seq, if_info->jump, INSN_LOCATION (if_info->insn_a));
+ if_info->transform_name = "noce_try_sign_mask";
+
return TRUE;
}
emit_insn_before_setloc (seq, if_info->jump,
INSN_LOCATION (if_info->insn_a));
}
+ if_info->transform_name = "noce_try_bitop";
return TRUE;
}
}
num_updated_if_blocks++;
+ if_info->transform_name = "noce_convert_multiple_sets";
return TRUE;
}
&& bb_ok_for_noce_convert_multiple_sets (then_bb, if_info))
{
if (noce_convert_multiple_sets (if_info))
- return TRUE;
+ {
+ if (dump_file && if_info->transform_name)
+ fprintf (dump_file, "if-conversion succeeded through %s\n",
+ if_info->transform_name);
+ return TRUE;
+ }
}
if (! bb_valid_for_noce_process_p (then_bb, cond, &if_info->then_cost,
return FALSE;
success:
+ if (dump_file && if_info->transform_name)
+ fprintf (dump_file, "if-conversion succeeded through %s\n",
+ if_info->transform_name);
/* If we used a temporary, fix it up now. */
if (orig_x != x)