diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2011-07-21 15:46:28 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2011-07-21 15:46:28 +0000 |
commit | e951472536aab778c6bd5c605fc908439cd64cff (patch) | |
tree | ec647468b073410ebc2f763a0d86402b9b4fb8d4 /gcc | |
parent | f985cc7ed453d916daac998c16f73f3d321987c6 (diff) | |
download | gcc-e951472536aab778c6bd5c605fc908439cd64cff.zip gcc-e951472536aab778c6bd5c605fc908439cd64cff.tar.gz gcc-e951472536aab778c6bd5c605fc908439cd64cff.tar.bz2 |
avr.c (final_prescan_insn): Fix printing of rtx_costs.
* config/avr/avr.c (final_prescan_insn): Fix printing of rtx_costs.
From-SVN: r176575
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccfcfee..b9d95fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index a1d0c88..4951f56 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -1629,12 +1629,18 @@ byte_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) 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())); } } |