OSDN Git Service

* tree-sra.c (generate_element_init): Remove any useless conversions.
[pf3gnuchains/gcc-fork.git] / gcc / tree-optimize.c
index a9217b1..cfac6f7 100644 (file)
@@ -319,6 +319,7 @@ init_tree_optimization_passes (void)
   NEXT_PASS (pass_fold_builtins);
   NEXT_PASS (pass_split_crit_edges);
   NEXT_PASS (pass_pre);
+  NEXT_PASS (pass_loop);
   NEXT_PASS (DUP_PASS (pass_dominator));
   NEXT_PASS (DUP_PASS (pass_redundant_phi));
   NEXT_PASS (pass_cd_dce);
@@ -333,6 +334,11 @@ init_tree_optimization_passes (void)
   NEXT_PASS (pass_remove_useless_vars);
   *p = NULL;
 
+  p = &pass_loop.sub;
+  NEXT_PASS (pass_loop_init);
+  NEXT_PASS (pass_loop_done);
+  *p = NULL;
+
 #undef NEXT_PASS
 #undef DUP_PASS
 
@@ -349,9 +355,8 @@ execute_todo (unsigned int flags)
 {
   if (flags & TODO_rename_vars)
     {
-      if (bitmap_first_set_bit (vars_to_rename) >= 0)
-       rewrite_into_ssa ();
-      BITMAP_XFREE (vars_to_rename);
+      rewrite_into_ssa (false);
+      bitmap_clear (vars_to_rename);
     }
 
   if ((flags & TODO_dump_func) && dump_file)
@@ -407,10 +412,6 @@ execute_one_pass (struct tree_opt_pass *pass)
   if (pass->tv_id)
     timevar_push (pass->tv_id);
 
-  /* If the pass is requesting ssa variable renaming, allocate the bitmap.  */
-  if (pass->todo_flags_finish & TODO_rename_vars)
-    vars_to_rename = BITMAP_XMALLOC ();
-
   /* Do it!  */
   if (pass->execute)
     pass->execute ();
@@ -466,14 +467,10 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
   input_location = DECL_SOURCE_LOCATION (fndecl);
   init_function_start (fndecl);
 
-  /* This function is being processed in whole-function mode.  */
-  cfun->x_whole_function_mode_p = 1;
-
   /* Even though we're inside a function body, we still don't want to
      call expand_expr to calculate the size of a variable-sized array.
      We haven't necessarily assigned RTL to all variables yet, so it's
      not safe to try to expand expressions involving them.  */
-  immediate_size_expand = 0;
   cfun->x_dont_save_pending_sizes_p = 1;
 
   node = cgraph_node (fndecl);
@@ -509,6 +506,9 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
        }
     }
 
+  if (!vars_to_rename)
+    vars_to_rename = BITMAP_XMALLOC ();
+
   /* If this is a nested function, protect the local variables in the stack
      above us from being collected while we're compiling this function.  */
   if (nested_p)