OSDN Git Service

* config/rs6000/rs6000.md (andsi3): Add attribute "compare" for
[pf3gnuchains/gcc-fork.git] / gcc / tree-optimize.c
index fdb7e76..4fd6240 100644 (file)
@@ -391,7 +391,9 @@ init_tree_optimization_passes (void)
   p = &pass_loop.sub;
   NEXT_PASS (pass_loop_init);
   NEXT_PASS (pass_lim);
+  NEXT_PASS (pass_unswitch);
   NEXT_PASS (pass_iv_canon);
+  NEXT_PASS (pass_record_bounds);
   NEXT_PASS (pass_if_conversion);
   NEXT_PASS (pass_vectorize);
   NEXT_PASS (pass_linear_transform);
@@ -503,7 +505,7 @@ execute_one_pass (struct tree_opt_pass *pass)
   if (dump_file
       && (pass->properties_provided & (PROP_cfg | PROP_rtl))
          == (PROP_cfg | PROP_rtl))
-    print_rtl_graph_with_bb (dump_file_name, get_insns ());
+    print_rtl_with_bb (dump_file, get_insns ());
 
   /* Run post-pass cleanup and verification.  */
   todo = pass->todo_flags_finish;
@@ -541,7 +543,7 @@ execute_pass_list (struct tree_opt_pass *pass)
 }
 \f
 
-/* update recursivly all inlined_to pointers of functions
+/* Update recursively all inlined_to pointers of functions
    inlined into NODE to INLINED_TO.  */
 static void
 update_inlined_to_pointers (struct cgraph_node *node,
@@ -553,7 +555,7 @@ update_inlined_to_pointers (struct cgraph_node *node,
       if (e->callee->global.inlined_to)
        {
          e->callee->global.inlined_to = inlined_to;
-         update_inlined_to_pointers (e->callee, node);
+         update_inlined_to_pointers (e->callee, inlined_to);
        }
     }
 }
@@ -563,7 +565,7 @@ update_inlined_to_pointers (struct cgraph_node *node,
    compilation for FNDECL.  */
 
 void
-tree_rest_of_compilation (tree fndecl, bool nested_p)
+tree_rest_of_compilation (tree fndecl)
 {
   location_t saved_loc;
   struct cgraph_node *saved_node = NULL, *node;
@@ -627,11 +629,6 @@ 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)
-    ggc_push_context ();
-
   /* Perform all tree transforms and optimizations.  */
   execute_pass_list (all_passes);
 
@@ -648,20 +645,14 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
       if (!flag_unit_at_a_time)
        {
          struct cgraph_edge *e;
-         verify_cgraph ();
+
          while (node->callees)
            cgraph_remove_edge (node->callees);
          node->callees = saved_node->callees;
          saved_node->callees = NULL;
+         update_inlined_to_pointers (node, node);
          for (e = node->callees; e; e = e->next_callee)
-           {
-             if (e->callee->global.inlined_to)
-               {
-                 e->callee->global.inlined_to = node;
-                 update_inlined_to_pointers (e->callee, node);
-               }
-             e->caller = node;
-           }
+           e->caller = node;
          cgraph_remove_node (saved_node);
        }
     }
@@ -693,7 +684,7 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
        }
     }
 
-  if (!nested_p && !flag_inline_trees)
+  if (!flag_inline_trees)
     {
       DECL_SAVED_TREE (fndecl) = NULL;
       if (DECL_STRUCT_FUNCTION (fndecl) == 0
@@ -712,9 +703,5 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
   input_location = saved_loc;
 
   ggc_collect ();
-
-  /* Undo the GC context switch.  */
-  if (nested_p)
-    ggc_pop_context ();
   timevar_pop (TV_EXPAND);
 }