diff mbox series

ira: Remove duplicate `memset' over `full_costs' from `assign_hard_reg'

Message ID alpine.DEB.2.20.2211142306400.19931@tpp.orcam.me.uk
State New
Headers show
Series ira: Remove duplicate `memset' over `full_costs' from `assign_hard_reg' | expand

Commit Message

Maciej W. Rozycki Nov. 14, 2022, 11:21 p.m. UTC
Remove duplicate clearing of `full_costs' made in `assign_hard_reg', 
which has been there since the beginning, i.e. commit 058e97ecf33a
("IRA has been merged into trunk"), 
<https://gcc.gnu.org/ml/gcc-patches/2008-08/msg01932.html>.

	gcc/
	* ira-color.cc (assign_hard_reg): Remove duplicate `memset' over 
	`full_costs'.
---
Hi,

 I find this fairly obvious, OK to apply?

  Maciej
---
 gcc/ira-color.cc |    1 -
 1 file changed, 1 deletion(-)

gcc-ira-assign-hard-reg-full-costs-dup.diff

Comments

Jeff Law Nov. 15, 2022, 12:11 a.m. UTC | #1
On 11/14/22 16:21, Maciej W. Rozycki wrote:
> Remove duplicate clearing of `full_costs' made in `assign_hard_reg',
> which has been there since the beginning, i.e. commit 058e97ecf33a
> ("IRA has been merged into trunk"),
> <https://gcc.gnu.org/ml/gcc-patches/2008-08/msg01932.html>.
>
> 	gcc/
> 	* ira-color.cc (assign_hard_reg): Remove duplicate `memset' over
> 	`full_costs'.
> ---
> Hi,
>
>   I find this fairly obvious, OK to apply?

Seems obvious to me as well.  OK.

jeff
Maciej W. Rozycki Nov. 15, 2022, 11:24 a.m. UTC | #2
On Mon, 14 Nov 2022, Jeff Law wrote:

> > 	gcc/
> > 	* ira-color.cc (assign_hard_reg): Remove duplicate `memset' over
> > 	`full_costs'.
> > ---
> > Hi,
> > 
> >   I find this fairly obvious, OK to apply?
> 
> Seems obvious to me as well.  OK.

 Thanks, now committed.

  Maciej
diff mbox series

Patch

Index: gcc/gcc/ira-color.cc
===================================================================
--- gcc.orig/gcc/ira-color.cc
+++ gcc/gcc/ira-color.cc
@@ -1961,7 +1961,6 @@  assign_hard_reg (ira_allocno_t a, bool r
   aclass = ALLOCNO_CLASS (a);
   class_size = ira_class_hard_regs_num[aclass];
   best_hard_regno = -1;
-  memset (full_costs, 0, sizeof (int) * class_size);
   mem_cost = 0;
   memset (costs, 0, sizeof (int) * class_size);
   memset (full_costs, 0, sizeof (int) * class_size);