diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-15 19:17:02 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-15 19:17:02 +0000 |
commit | a27d5d8c791f3c083dc9d145e352e31c852ac729 (patch) | |
tree | 697e3b17ac03515e7c82ce6bb5ead310c8643b48 /gcc/lra-assigns.c | |
parent | cec17acdcfa2d37110835686b803a64dadbe5ed9 (diff) | |
download | gcc-a27d5d8c791f3c083dc9d145e352e31c852ac729.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196090 138bc75d-0d04-0410-961f-82ee72b054a4
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 33666fd07b1..b2045138b91 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; |