OSDN Git Service

* config/vax/vax.c (split_quadword_operands): Use MEM_P()
[pf3gnuchains/gcc-fork.git] / gcc / passes.c
index e088be1..85bfefa 100644 (file)
@@ -216,10 +216,10 @@ finish_optimization_passes (void)
   timevar_push (TV_DUMP);
   if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
     {
-      dump_file = dump_begin (pass_branch_prob.static_pass_number, NULL);
+      dump_file = dump_begin (pass_profile.static_pass_number, NULL);
       end_branch_prob ();
       if (dump_file)
-       dump_end (pass_branch_prob.static_pass_number, dump_file);
+       dump_end (pass_profile.static_pass_number, dump_file);
     }
 
   if (optimize > 0)
@@ -364,7 +364,7 @@ register_dump_files_1 (struct tree_opt_pass *pass, bool ipa, int properties)
 
 /* Register the dump files for the pipeline starting at PASS.  IPA is
    true if the pass is inter-procedural, and PROPERTIES reflects the
-   properties that are guarenteed to be available at the beginning of
+   properties that are guaranteed to be available at the beginning of
    the pipeline.  */
 
 static void 
@@ -633,10 +633,7 @@ init_optimization_passes (void)
   NEXT_PASS (pass_jump2);
   NEXT_PASS (pass_cse);
   NEXT_PASS (pass_gcse);
-  NEXT_PASS (pass_loop_optimize);
   NEXT_PASS (pass_jump_bypass);
-  NEXT_PASS (pass_cfg);
-  NEXT_PASS (pass_branch_prob);
   NEXT_PASS (pass_rtl_ifcvt);
   NEXT_PASS (pass_tracer);
   /* Perform loop optimizations.  It might be better to do them a bit
@@ -718,8 +715,12 @@ execute_todo (unsigned int flags)
   flags &= ~last_verified;
   if (!flags)
     return;
+  
+  /* Always recalculate SMT usage before doing anything else.  */
+  if (flags & TODO_update_smt_usage)
+    recalculate_used_alone ();
 
-  /* Always cleanup the CFG before doing anything else.  */
+  /* Always cleanup the CFG before trying to update SSA .  */
   if (flags & TODO_cleanup_cfg)
     {
       if (current_loops)
@@ -804,6 +805,7 @@ static bool
 execute_one_pass (struct tree_opt_pass *pass)
 {
   bool initializing_dump;
+  unsigned int todo_after = 0;
 
   /* See if we're supposed to run this pass.  */
   if (pass->gate && !pass->gate ())
@@ -822,6 +824,9 @@ execute_one_pass (struct tree_opt_pass *pass)
   gcc_assert ((curr_properties & pass->properties_required)
              == pass->properties_required);
 
+  if (pass->properties_destroyed & PROP_smt_usage)
+    updating_used_alone = true;
+
   /* If a dump file name is present, open it if enabled.  */
   if (pass->static_pass_number != -1)
     {
@@ -852,7 +857,7 @@ execute_one_pass (struct tree_opt_pass *pass)
   /* Do it!  */
   if (pass->execute)
     {
-      pass->execute ();
+      todo_after = pass->execute ();
       last_verified = 0;
     }
 
@@ -874,7 +879,7 @@ execute_one_pass (struct tree_opt_pass *pass)
     }
 
   /* Run post-pass cleanup and verification.  */
-  execute_todo (pass->todo_flags_finish);
+  execute_todo (todo_after | pass->todo_flags_finish);
 
   /* Flush and close dump file.  */
   if (dump_file_name)
@@ -888,6 +893,9 @@ execute_one_pass (struct tree_opt_pass *pass)
       dump_file = NULL;
     }
 
+  if (pass->properties_destroyed & PROP_smt_usage)
+    updating_used_alone = false;
+
   return true;
 }