Commit 68bc509a by Eric Botcazou

combine.c (combine_validate_cost): Adjust comments.

	* combine.c (combine_validate_cost): Adjust comments.  Set registered
	cost of I0 to zero at the end, if any.

From-SVN: r172216
parent 51a30b32
2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
* combine.c (combine_validate_cost): Adjust comments. Set registered
cost of I0 to zero at the end, if any.
2011-04-08 Xinliang David Li <davidxl@google.com> 2011-04-08 Xinliang David Li <davidxl@google.com>
* ipa-cp.c (ipcp_update_profiling): Correct * ipa-cp.c (ipcp_update_profiling): Correct negative scale factor due
negative scale factor due to insane profile data. to insane profile data.
2011-04-08 Xinliang David Li <davidxl@google.com> 2011-04-08 Xinliang David Li <davidxl@google.com>
...@@ -11,9 +16,9 @@ ...@@ -11,9 +16,9 @@
2011-04-08 Steven G. Kargl <kargl@gcc.gnu.org> 2011-04-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR 47829 PR target/47829
gcc/config.gcc: disable unwind table generation for crtbegin/crtend * config.gcc (i386-*-freebsd): Disable unwind table generation for
on i386-*-freebsd. crtbegin/crtend.
2011-04-08 Michael Matz <matz@suse.de> 2011-04-08 Michael Matz <matz@suse.de>
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
2011-04-08 Vladimir Makarov <vmakarov@redhat.com> 2011-04-08 Vladimir Makarov <vmakarov@redhat.com>
PR 48435 PR inline-asm/48435
* ira-color.c (setup_profitable_hard_regs): Add comments. * ira-color.c (setup_profitable_hard_regs): Add comments.
Don't take prohibited hard regs into account. Don't take prohibited hard regs into account.
(setup_conflict_profitable_regs): Rename to (setup_conflict_profitable_regs): Rename to
......
...@@ -789,14 +789,13 @@ do_SUBST_MODE (rtx *into, enum machine_mode newval) ...@@ -789,14 +789,13 @@ do_SUBST_MODE (rtx *into, enum machine_mode newval)
#define SUBST_MODE(INTO, NEWVAL) do_SUBST_MODE(&(INTO), (NEWVAL)) #define SUBST_MODE(INTO, NEWVAL) do_SUBST_MODE(&(INTO), (NEWVAL))
/* Subroutine of try_combine. Determine whether the combine replacement /* Subroutine of try_combine. Determine whether the replacement patterns
patterns NEWPAT, NEWI2PAT and NEWOTHERPAT are cheaper according to NEWPAT, NEWI2PAT and NEWOTHERPAT are cheaper according to insn_rtx_cost
insn_rtx_cost that the original instruction sequence I0, I1, I2, I3 and than the original sequence I0, I1, I2, I3 and undobuf.other_insn. Note
undobuf.other_insn. Note that I1 and/or NEWI2PAT may be NULL_RTX. that I0, I1 and/or NEWI2PAT may be NULL_RTX. Similarly, NEWOTHERPAT and
NEWOTHERPAT and undobuf.other_insn may also both be NULL_RTX. This undobuf.other_insn may also both be NULL_RTX. Return false if the cost
function returns false, if the costs of all instructions can be of all the instructions can be estimated and the replacements are more
estimated, and the replacements are more expensive than the original expensive than the original sequence. */
sequence. */
static bool static bool
combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat, combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat,
...@@ -861,10 +860,9 @@ combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat, ...@@ -861,10 +860,9 @@ combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat,
old_cost = 0; old_cost = 0;
} }
/* Disallow this recombination if both new_cost and old_cost are /* Disallow this combination if both new_cost and old_cost are greater than
greater than zero, and new_cost is greater than old cost. */ zero, and new_cost is greater than old cost. */
if (old_cost > 0 if (old_cost > 0 && new_cost > old_cost)
&& new_cost > old_cost)
{ {
if (dump_file) if (dump_file)
{ {
...@@ -910,7 +908,11 @@ combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat, ...@@ -910,7 +908,11 @@ combine_validate_cost (rtx i0, rtx i1, rtx i2, rtx i3, rtx newpat,
INSN_COST (i2) = new_i2_cost; INSN_COST (i2) = new_i2_cost;
INSN_COST (i3) = new_i3_cost; INSN_COST (i3) = new_i3_cost;
if (i1) if (i1)
INSN_COST (i1) = 0; {
INSN_COST (i1) = 0;
if (i0)
INSN_COST (i0) = 0;
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment