diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2013-02-15 19:17:02 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2013-02-15 19:17:02 +0000 |
commit | 479189517610591e746369fc4d80302f5cebdbd7 (patch) | |
tree | 697e3b17ac03515e7c82ce6bb5ead310c8643b48 /gcc/lra-assigns.c | |
parent | 3ab98a471c4b1aec557583e674beacd15be4955d (diff) | |
download | gcc-479189517610591e746369fc4d80302f5cebdbd7.zip gcc-479189517610591e746369fc4d80302f5cebdbd7.tar.gz gcc-479189517610591e746369fc4d80302f5cebdbd7.tar.bz2 |
re PR rtl-optimization/56348 (internal compiler error in assign_by_spills with -m32 -fPIC -msse2)
2013-02-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/56348
* lra-assigns.c (reload_pseudo_compare_func): Prefer bigger pseudos.
2013-02-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/56348
* gcc.target/i386/pr56348.c: New test.
From-SVN: r196090
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r-- | gcc/lra-assigns.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 33666fd..b204513 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -197,6 +197,12 @@ reload_pseudo_compare_func (const void *v1p, const void *v2p) 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 + fragmentation. */ + 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) + return diff; /* Put pseudos from the thread nearby. */ if ((diff = regno_assign_info[r1].first - regno_assign_info[r2].first) != 0) return diff; |