aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2011-08-19 22:17:26 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2011-08-19 22:17:26 +0000
commit3bb19a90c8d642f6659a20cc6d2e51d3de25b0a4 (patch)
tree58608fae12ae7e877ca12b2fd9744af635d10486 /gcc
parent02ee3d31539a74740040921e34e38035fbd8ac72 (diff)
downloadgcc-3bb19a90c8d642f6659a20cc6d2e51d3de25b0a4.zip
gcc-3bb19a90c8d642f6659a20cc6d2e51d3de25b0a4.tar.gz
gcc-3bb19a90c8d642f6659a20cc6d2e51d3de25b0a4.tar.bz2
re PR rtl-optimization/49936 (IRA handles CANNOT_CHANGE_MODE_CLASS poorly, + spills to memory on 4.7)
2011-08-19 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/49936 * ira.c (ira_init_register_move_cost): Ignore too small subclasses for calculation of max register move costs. From-SVN: r177916
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ira.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6457234..c474058 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-19 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/49936
+ * ira.c (ira_init_register_move_cost): Ignore too small subclasses
+ for calculation of max register move costs.
+
2011-08-19 Joseph Myers <joseph@codesourcery.com>
* c-parser.c (c_parser_postfix_expression): Convert operands of
diff --git a/gcc/ira.c b/gcc/ira.c
index e4be8b5..785478f 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1501,6 +1501,10 @@ ira_init_register_move_cost (enum machine_mode mode)
sizeof (move_table) * N_REG_CLASSES);
for (cl1 = 0; cl1 < N_REG_CLASSES; cl1++)
{
+ /* Some subclasses are to small to have enough registers to hold
+ a value of MODE. Just ignore them. */
+ if (! contains_reg_of_mode[cl1][mode])
+ continue;
COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[cl1]);
AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);
if (hard_reg_set_empty_p (temp_hard_regset))