* RFA: patch for PR48455
@ 2011-04-13 17:09 Vladimir Makarov
2011-04-13 17:12 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Makarov @ 2011-04-13 17:09 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
The following patch should improve code size which degradation for arm
is reported on
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48455
Is it ok to commit? The patch was successfully bootstrapped on x86-64
and i686 with H.J.'s autotester options.
2011-04-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/48455
* ira-costs.c (find_costs_and_classes): Use i_mem_cost instead of
`temp_costs->mem_cost'.
[-- Attachment #2: pr48455.patch --]
[-- Type: text/plain, Size: 1643 bytes --]
Index: ira-costs.c
===================================================================
--- ira-costs.c (revision 172376)
+++ ira-costs.c (working copy)
@@ -1646,44 +1646,44 @@
for (k = cost_classes_ptr->num - 1; k >= 0; k--)
{
add_cost = a_costs[k];
if (add_cost > 0 && INT_MAX - add_cost < i_costs[k])
i_costs[k] = INT_MAX;
else
i_costs[k] += add_cost;
}
add_cost = COSTS (costs, a_num)->mem_cost;
if (add_cost > 0 && INT_MAX - add_cost < i_mem_cost)
i_mem_cost = INT_MAX;
else
i_mem_cost += add_cost;
#ifdef FORBIDDEN_INC_DEC_CLASSES
if (in_inc_dec[a_num])
inc_dec_p = true;
#endif
}
}
if (equiv_savings < 0)
- temp_costs->mem_cost = -equiv_savings;
+ i_mem_cost = -equiv_savings;
else if (equiv_savings > 0)
{
- temp_costs->mem_cost = 0;
+ i_mem_cost = 0;
for (k = cost_classes_ptr->num - 1; k >= 0; k--)
i_costs[k] += equiv_savings;
}
best_cost = (1 << (HOST_BITS_PER_INT - 2)) - 1;
best = ALL_REGS;
alt_class = NO_REGS;
/* Find best common class for all allocnos with the same
regno. */
for (k = 0; k < cost_classes_ptr->num; k++)
{
rclass = cost_classes[k];
/* Ignore classes that are too small for this operand or
invalid for an operand that was auto-incremented. */
if (! contains_reg_of_mode[rclass][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES
|| (inc_dec_p && forbidden_inc_dec_class[rclass])
#endif
#ifdef CANNOT_CHANGE_MODE_CLASS
|| invalid_mode_change_p (i, (enum reg_class) rclass)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFA: patch for PR48455
2011-04-13 17:09 RFA: patch for PR48455 Vladimir Makarov
@ 2011-04-13 17:12 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2011-04-13 17:12 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/13/11 11:09, Vladimir Makarov wrote:
> The following patch should improve code size which degradation for arm
> is reported on
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48455
>
> Is it ok to commit? The patch was successfully bootstrapped on x86-64
> and i686 with H.J.'s autotester options.
>
> 2011-04-13 Vladimir Makarov <vmakarov@redhat.com>
>
> PR rtl-optimization/48455
> * ira-costs.c (find_costs_and_classes): Use i_mem_cost instead of
> `temp_costs->mem_cost'.
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNpdmPAAoJEBRtltQi2kC78cUIAKd41H7LfANsVOH5tuY/ZmR9
X7aRad0exevCKhRYuGBfKtZHJ1OHCvOTHxOr6Xvak/BUNuMkuZPaazc5c4rg1HRc
Fo43AM+NuxLHvNWi+gvN4sY1fhrGjYquwu5TNQ7TM26Njvbb1s1JwQtUEdly02yg
HDwSqxqurAfkAD3xrE2+sOUF/WfbE4DFS/OKCqCLr8AnQPXYu8dqA3QRjqoSuBcB
3sd0x/gTplMaJUk/B+B8xrxlOSZSooRCYp3SQhsvEWTUdhNCAYrrh2HDC26H4H9P
Uusc8PHnolU0JL5onwN/mGqu2+mrgJ8Z4Xbc2cSAMnOlf6ATQhpdcTvFUeFA7Rw=
=cfcO
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-13 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13 17:09 RFA: patch for PR48455 Vladimir Makarov
2011-04-13 17:12 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).