OSDN Git Service

2008-10-14 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 2008 00:52:59 +0000 (00:52 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 2008 00:52:59 +0000 (00:52 +0000)
PR target/37633
* ira-costs.c (ira_tune_allocno_costs_and_cover_classes): Check
HARD_REGNO_CALL_PART_CLOBBERED.

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

gcc/ChangeLog
gcc/ira-costs.c

index 68ae6ec..ccdc92e 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-14  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/37633
+       * ira-costs.c (ira_tune_allocno_costs_and_cover_classes): Check
+       HARD_REGNO_CALL_PART_CLOBBERED.
+
 2008-10-15  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR middle-end/37535
index 7749020..64b2e79 100644 (file)
@@ -1572,8 +1572,8 @@ ira_tune_allocno_costs_and_cover_classes (void)
              regno = ira_class_hard_regs[cover_class][j];
              rclass = REGNO_REG_CLASS (regno);
              cost = 0;
-             /* ??? If only part is call clobbered.  */
-             if (! ira_hard_reg_not_in_set_p (regno, mode, call_used_reg_set))
+             if (! ira_hard_reg_not_in_set_p (regno, mode, call_used_reg_set)
+                 || HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))
                cost += (ALLOCNO_CALL_FREQ (a)
                         * (ira_memory_move_cost[mode][rclass][0]
                            + ira_memory_move_cost[mode][rclass][1]));