OSDN Git Service

2011-11-07 Terry Guo <terry.guo@arm.com>
[pf3gnuchains/gcc-fork.git] / gcc / loop-init.c
index a1a9163..9184a14 100644 (file)
@@ -1,5 +1,5 @@
 /* Loop optimizer initialization routines and RTL loop optimization passes.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -45,7 +45,7 @@ loop_optimizer_init (unsigned flags)
   struct loops *loops;
 
   gcc_assert (!current_loops);
-  loops = GGC_CNEW (struct loops);
+  loops = ggc_alloc_cleared_loops ();
 
   /* Find the loops.  */
 
@@ -72,7 +72,7 @@ loop_optimizer_init (unsigned flags)
 
       if (flags & LOOPS_HAVE_FALLTHRU_PREHEADERS)
         cp_flags |= CP_FALLTHRU_PREHEADERS;
-      
+
       create_preheaders (cp_flags);
     }
 
@@ -123,14 +123,6 @@ loop_optimizer_finalize (void)
     {
       bb->loop_father = NULL;
     }
-
-  /* Checking.  */
-#ifdef ENABLE_CHECKING
-  /* FIXME: no point to verify flow info after bundling on ia64.  Use this 
-     hack for achieving this.  */
-  if (!reload_completed)
-    verify_flow_info ();
-#endif
 }
 
 \f
@@ -166,7 +158,6 @@ struct rtl_opt_pass pass_loop2 =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func |
   TODO_ggc_collect                      /* todo_flags_finish */
  }
 };
@@ -177,7 +168,7 @@ static unsigned int
 rtl_loop_init (void)
 {
   gcc_assert (current_ir_type () == IR_RTL_CFGLAYOUT);
-  
+
   if (dump_file)
     dump_flow_info (dump_file, dump_flags);
 
@@ -200,7 +191,7 @@ struct rtl_opt_pass pass_rtl_loop_init =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
 
@@ -235,7 +226,8 @@ struct rtl_opt_pass pass_rtl_loop_done =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_flow
+    | TODO_verify_rtl_sharing           /* todo_flags_finish */
  }
 };
 
@@ -265,14 +257,13 @@ struct rtl_opt_pass pass_rtl_move_loop_invariants =
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  TV_LOOP,                              /* tv_id */
+  TV_LOOP_MOVE_INVARIANTS,              /* tv_id */
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */ 
+  0,                                    /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish | TODO_verify_rtl_sharing |
-  TODO_dump_func                        /* todo_flags_finish */
+  TODO_df_finish | TODO_verify_rtl_sharing  /* todo_flags_finish */
  }
 };
 
@@ -302,12 +293,12 @@ struct rtl_opt_pass pass_rtl_unswitch =
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  TV_LOOP,                              /* tv_id */
+  TV_LOOP_UNSWITCH,                     /* tv_id */
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -350,12 +341,12 @@ struct rtl_opt_pass pass_rtl_unroll_and_peel_loops =
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  TV_LOOP,                              /* tv_id */
+  TV_LOOP_UNROLL,                       /* tv_id */
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
+  TODO_verify_rtl_sharing,              /* todo_flags_finish */
  }
 };
 
@@ -391,12 +382,11 @@ struct rtl_opt_pass pass_rtl_doloop =
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  TV_LOOP,                              /* tv_id */
+  TV_LOOP_DOLOOP,                       /* tv_id */
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func | TODO_verify_rtl_sharing /* todo_flags_finish */
+  TODO_verify_rtl_sharing               /* todo_flags_finish */
  }
 };
-