]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-11-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Nov 2010 15:52:24 +0000 (15:52 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Nov 2010 15:52:24 +0000 (15:52 +0000)
PR rtl-optimization/46237
* ira-conflicts.c (ira_build_conflicts): Record conflicts for call
saved hard regs if they might get partially clobbered.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166495 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ira-conflicts.c

index 5053dd7820f7213f39a36de0a218105899801052..b41bb8746594735714fb31a20363f34552a54587 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       PR rtl-optimization/46237
+       * ira-conflicts.c (ira_build_conflicts): Record conflicts for call
+       saved hard regs if they might get partially clobbered.
+
 2010-11-09  Paul Koning  <ni1d@arrl.net>
 
        * config/pdp11/pdp11.md (lshrsi3, lshrhi3): Use add for
index be79523359b4c268b88a12bcf89019a77e0328a3..2891ab788675423eb1c2714fa8b57b76e96fe82c 100644 (file)
@@ -908,6 +908,23 @@ ira_build_conflicts (void)
              IOR_HARD_REG_SET (OBJECT_CONFLICT_HARD_REGS (obj),
                                temp_hard_reg_set);
            }
+
+         if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
+           {
+             int regno;
+
+             /* Allocnos bigger than the saved part of call saved
+                regs must conflict with them.  */
+             for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
+               if (!TEST_HARD_REG_BIT (call_used_reg_set, regno)
+                   && HARD_REGNO_CALL_PART_CLOBBERED (regno,
+                                                      obj->allocno->mode))
+                 {
+                   SET_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), regno);
+                   SET_HARD_REG_BIT (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj),
+                                     regno);
+                 }
+           }
        }
     }
   if (optimize && ira_conflicts_p