OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / ira.c
index e848b35..41a2928 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1,5 +1,5 @@
 /* Integrated Register Allocator (IRA) entry point.
-   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
+   Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Contributed by Vladimir Makarov <vmakarov@redhat.com>.
 
@@ -718,7 +718,7 @@ ira_print_disposition (FILE *f)
        if ((bb = ALLOCNO_LOOP_TREE_NODE (a)->bb) != NULL)
          fprintf (f, "b%-3d", bb->index);
        else
-         fprintf (f, "l%-3d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num);
+         fprintf (f, "l%-3d", ALLOCNO_LOOP_TREE_NODE (a)->loop_num);
        if (ALLOCNO_HARD_REGNO (a) >= 0)
          fprintf (f, " %3d", ALLOCNO_HARD_REGNO (a));
        else
@@ -2089,7 +2089,7 @@ check_allocation (void)
          int this_regno = hard_regno;
          if (n > 1)
            {
-             if (WORDS_BIG_ENDIAN)
+             if (REG_WORDS_BIG_ENDIAN)
                this_regno += n - i - 1;
              else
                this_regno += i;
@@ -2108,7 +2108,7 @@ check_allocation (void)
              if (ALLOCNO_NUM_OBJECTS (conflict_a) > 1
                  && conflict_nregs == ALLOCNO_NUM_OBJECTS (conflict_a))
                {
-                 if (WORDS_BIG_ENDIAN)
+                 if (REG_WORDS_BIG_ENDIAN)
                    conflict_hard_regno += (ALLOCNO_NUM_OBJECTS (conflict_a)
                                            - OBJECT_SUBWORD (conflict_obj) - 1);
                  else
@@ -2335,7 +2335,7 @@ validate_equiv_mem_from_store (rtx dest, const_rtx set ATTRIBUTE_UNUSED,
   if ((REG_P (dest)
        && reg_overlap_mentioned_p (dest, equiv_mem))
       || (MEM_P (dest)
-         && true_dependence (dest, VOIDmode, equiv_mem, rtx_varies_p)))
+         && true_dependence (dest, VOIDmode, equiv_mem)))
     equiv_mem_modified = 1;
 }
 
@@ -2589,7 +2589,7 @@ memref_referenced_p (rtx memref, rtx x)
                                      reg_equiv[REGNO (x)].replacement));
 
     case MEM:
-      if (true_dependence (memref, VOIDmode, x, rtx_varies_p))
+      if (true_dependence (memref, VOIDmode, x))
        return 1;
       break;
 
@@ -3614,14 +3614,16 @@ ira (FILE *f)
   ira_move_loops_num = ira_additional_jumps_num = 0;
 
   ira_assert (current_loops == NULL);
-  flow_loops_find (&ira_loops);
-  record_loop_exits ();
-  current_loops = &ira_loops;
+  if (flag_ira_region == IRA_REGION_ALL || flag_ira_region == IRA_REGION_MIXED)
+    {
+      flow_loops_find (&ira_loops);
+      record_loop_exits ();
+      current_loops = &ira_loops;
+    }
 
   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
     fprintf (ira_dump_file, "Building IRA IR\n");
-  loops_p = ira_build (flag_ira_region == IRA_REGION_ALL
-                      || flag_ira_region == IRA_REGION_MIXED);
+  loops_p = ira_build ();
 
   ira_assert (ira_conflicts_p || !loops_p);
 
@@ -3722,7 +3724,7 @@ do_reload (void)
   basic_block bb;
   bool need_dce;
 
-  if (flag_ira_verbose < 10 && dump_file)
+  if (flag_ira_verbose < 10)
     ira_dump_file = dump_file;
 
   df_set_flags (DF_NO_INSN_RESCAN);
@@ -3745,8 +3747,11 @@ do_reload (void)
 
   flag_ira_share_spill_slots = saved_flag_ira_share_spill_slots;
 
-  flow_loops_free (&ira_loops);
-  free_dominance_info (CDI_DOMINATORS);
+  if (current_loops != NULL)
+    {
+      flow_loops_free (&ira_loops);
+      free_dominance_info (CDI_DOMINATORS);
+    }
   FOR_ALL_BB (bb)
     bb->loop_father = NULL;
   current_loops = NULL;