OSDN Git Service

[gcc/ChangeLog]
[pf3gnuchains/gcc-fork.git] / gcc / sched-rgn.c
index 138bab3..673416f 100644 (file)
@@ -1,6 +1,6 @@
 /* Instruction scheduling pass.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
    and currently maintained by, Jim Wilson (wilson@cygnus.com)
 
@@ -155,7 +155,7 @@ static int *containing_rgn;
 
 void debug_regions (void);
 static void find_single_block_region (void);
-static void find_rgns (struct edge_list *, dominance_info);
+static void find_rgns (struct edge_list *);
 static int too_large (int, int *, int *);
 
 extern void debug_live (int, int);
@@ -346,7 +346,7 @@ is_cfg_nonregular (void)
     for (insn = BB_HEAD (b); ; insn = NEXT_INSN (insn))
       {
        code = GET_CODE (insn);
-       if (GET_RTX_CLASS (code) == 'i' && code != JUMP_INSN)
+       if (INSN_P (insn) && code != JUMP_INSN)
          {
            rtx note = find_reg_note (insn, REG_LABEL, NULL_RTX);
 
@@ -613,7 +613,7 @@ too_large (int block, int *num_bbs, int *num_insns)
    of edge tables.  That would simplify it somewhat.  */
 
 static void
-find_rgns (struct edge_list *edge_list, dominance_info dom)
+find_rgns (struct edge_list *edge_list)
 {
   int *max_hdr, *dfs_nr, *stack, *degree;
   char no_loops = 1;
@@ -827,7 +827,7 @@ find_rgns (struct edge_list *edge_list, dominance_info dom)
                    {
                      /* Now verify that the block is dominated by the loop
                         header.  */
-                     if (!dominated_by_p (dom, jbb, bb))
+                     if (!dominated_by_p (CDI_DOMINATORS, jbb, bb))
                        break;
                    }
                }
@@ -1323,7 +1323,7 @@ check_live_1 (int src, rtx x)
       if (regno < FIRST_PSEUDO_REGISTER)
        {
          /* Check for hard registers.  */
-         int j = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+         int j = hard_regno_nregs[regno][GET_MODE (reg)];
          while (--j >= 0)
            {
              for (i = 0; i < candidate_table[src].split_bbs.nr_members; i++)
@@ -1397,7 +1397,7 @@ update_live_1 (int src, rtx x)
     {
       if (regno < FIRST_PSEUDO_REGISTER)
        {
-         int j = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+         int j = hard_regno_nregs[regno][GET_MODE (reg)];
          while (--j >= 0)
            {
              for (i = 0; i < candidate_table[src].update_bbs.nr_members; i++)
@@ -2597,7 +2597,6 @@ init_regions (void)
        }
       else
        {
-         dominance_info dom;
          struct edge_list *edge_list;
 
          /* The scheduler runs after estimate_probabilities; therefore, we
@@ -2607,7 +2606,7 @@ init_regions (void)
          edge_list = create_edge_list ();
 
          /* Compute the dominators and post dominators.  */
-         dom = calculate_dominance_info (CDI_DOMINATORS);
+         calculate_dominance_info (CDI_DOMINATORS);
 
          /* build_control_flow will return nonzero if it detects unreachable
             blocks or any other irregularity with the cfg which prevents
@@ -2615,7 +2614,7 @@ init_regions (void)
          if (build_control_flow (edge_list) != 0)
            find_single_block_region ();
          else
-           find_rgns (edge_list, dom);
+           find_rgns (edge_list);
 
          if (sched_verbose >= 3)
            debug_regions ();
@@ -2625,7 +2624,7 @@ init_regions (void)
 
          /* For now.  This will move as more and more of haifa is converted
             to using the cfg code in flow.c.  */
-         free_dominance_info (dom);
+         free_dominance_info (CDI_DOMINATORS);
        }
     }