OSDN Git Service

2010-12-02 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / ira-conflicts.c
index 0ce1bbc..498b38b 100644 (file)
@@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "insn-config.h"
 #include "recog.h"
 #include "diagnostic-core.h"
-#include "toplev.h"
 #include "params.h"
 #include "df.h"
 #include "sparseset.h"
@@ -864,7 +863,8 @@ ira_build_conflicts (void)
          ira_free (conflicts);
        }
     }
-  if (! CLASS_LIKELY_SPILLED_P (base_reg_class (VOIDmode, ADDRESS, SCRATCH)))
+  if (! targetm.class_likely_spilled_p (base_reg_class (VOIDmode, ADDRESS,
+                                                       SCRATCH)))
     CLEAR_HARD_REG_SET (temp_hard_reg_set);
   else
     {
@@ -907,6 +907,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