mirror of git://gcc.gnu.org/git/gcc.git
lra: make reload_pseudo_compare_func a proper comparator
PR rtl-optimization/57878 PR rtl-optimization/68988 * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation avoidance test involving non_reload_pseudos. Move frequency test below the general fragmentation avoidance test. From-SVN: r252972
This commit is contained in:
parent
9412007cea
commit
ffaea11703
|
|
@ -1,3 +1,11 @@
|
||||||
|
2017-09-19 Alexander Monakov <amonakov@ispras.ru>
|
||||||
|
|
||||||
|
PR rtl-optimization/57878
|
||||||
|
PR rtl-optimization/68988
|
||||||
|
* lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
|
||||||
|
avoidance test involving non_reload_pseudos. Move frequency test
|
||||||
|
below the general fragmentation avoidance test.
|
||||||
|
|
||||||
2017-09-19 Richard Biener <rguenther@suse.de>
|
2017-09-19 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/69728
|
PR tree-optimization/69728
|
||||||
|
|
|
||||||
|
|
@ -211,24 +211,15 @@ reload_pseudo_compare_func (const void *v1p, const void *v2p)
|
||||||
if ((diff = (ira_class_hard_regs_num[cl1]
|
if ((diff = (ira_class_hard_regs_num[cl1]
|
||||||
- ira_class_hard_regs_num[cl2])) != 0)
|
- ira_class_hard_regs_num[cl2])) != 0)
|
||||||
return diff;
|
return diff;
|
||||||
if ((diff
|
|
||||||
= (ira_reg_class_max_nregs[cl2][lra_reg_info[r2].biggest_mode]
|
|
||||||
- ira_reg_class_max_nregs[cl1][lra_reg_info[r1].biggest_mode])) != 0
|
|
||||||
/* The code below executes rarely as nregs == 1 in most cases.
|
|
||||||
So we should not worry about using faster data structures to
|
|
||||||
check reload pseudos. */
|
|
||||||
&& ! bitmap_bit_p (&non_reload_pseudos, r1)
|
|
||||||
&& ! bitmap_bit_p (&non_reload_pseudos, r2))
|
|
||||||
return diff;
|
|
||||||
if ((diff = (regno_assign_info[regno_assign_info[r2].first].freq
|
|
||||||
- regno_assign_info[regno_assign_info[r1].first].freq)) != 0)
|
|
||||||
return diff;
|
|
||||||
/* Allocate bigger pseudos first to avoid register file
|
/* Allocate bigger pseudos first to avoid register file
|
||||||
fragmentation. */
|
fragmentation. */
|
||||||
if ((diff
|
if ((diff
|
||||||
= (ira_reg_class_max_nregs[cl2][lra_reg_info[r2].biggest_mode]
|
= (ira_reg_class_max_nregs[cl2][lra_reg_info[r2].biggest_mode]
|
||||||
- ira_reg_class_max_nregs[cl1][lra_reg_info[r1].biggest_mode])) != 0)
|
- ira_reg_class_max_nregs[cl1][lra_reg_info[r1].biggest_mode])) != 0)
|
||||||
return diff;
|
return diff;
|
||||||
|
if ((diff = (regno_assign_info[regno_assign_info[r2].first].freq
|
||||||
|
- regno_assign_info[regno_assign_info[r1].first].freq)) != 0)
|
||||||
|
return diff;
|
||||||
/* Put pseudos from the thread nearby. */
|
/* Put pseudos from the thread nearby. */
|
||||||
if ((diff = regno_assign_info[r1].first - regno_assign_info[r2].first) != 0)
|
if ((diff = regno_assign_info[r1].first - regno_assign_info[r2].first) != 0)
|
||||||
return diff;
|
return diff;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue