+2011-07-21 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.c (final_prescan_insn): Fix printing of rtx_costs.
+
2011-07-21 Jason Merrill <jason@redhat.com>
* system.h (HAVE_DESIGNATED_UNION_INITIALIZERS): New.
void
final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
- int num_operands ATTRIBUTE_UNUSED)
+ int num_operands ATTRIBUTE_UNUSED)
{
if (TARGET_ALL_DEBUG)
{
- fprintf (asm_out_file, "/* DEBUG: cost = %d. */\n",
- rtx_cost (PATTERN (insn), INSN, !optimize_size));
+ rtx set = single_set (insn);
+
+ if (set)
+ fprintf (asm_out_file, "/* DEBUG: cost = %d. */\n",
+ rtx_cost (SET_SRC (set), SET, optimize_insn_for_speed_p()));
+ else
+ fprintf (asm_out_file, "/* DEBUG: pattern-cost = %d. */\n",
+ rtx_cost (PATTERN (insn), INSN, optimize_insn_for_speed_p()));
}
}