]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ira: Remove duplicate `memset' over `full_costs' from `assign_hard_reg'
authorMaciej W. Rozycki <macro@embecosm.com>
Tue, 15 Nov 2022 11:23:02 +0000 (11:23 +0000)
committerMaciej W. Rozycki <macro@embecosm.com>
Tue, 15 Nov 2022 11:23:02 +0000 (11:23 +0000)
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'.

gcc/ira-color.cc

index ffe73b61c4505b159cd56b9e49d255aed3c612e1..f5f76e8089c9c229bbac77d9f24db5279800d763 100644 (file)
@@ -1961,7 +1961,6 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)
   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);