OSDN Git Service

* timevar.def (TV_WHOPR_WPA_FIXUP): Remove.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Apr 2010 21:58:50 +0000 (21:58 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:34:49 +0000 (14:34 +0900)
* lto-section-in.c (lto_section_name): Remove wpa_fixup.
* lto-wpa-fixup.c: Remove.
* Makefile.in (lto-wpa-fixup.o): Remove.
* passes.c (init_optimization_passes): Remove pass_ipa_lto_wpa_fixup.
(execute_all_ipa_transforms): Set cgraph_state to CGRAPH_STATE_IPA_SSA.
* lto-streamer.c (lto_get_section_name): Remove wpa_fixup section.

* lto.c (lto_fixup_tree): Do not call wpa fixup.
(materialize_cgraph): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158622 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lto-section-in.c
gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/passes.c

index 155c5fc..0b46616 100644 (file)
@@ -1,5 +1,15 @@
 2010-04-21  Jan Hubicka  <jh@suse.cz>
 
+       * timevar.def (TV_WHOPR_WPA_FIXUP): Remove.
+       * lto-section-in.c (lto_section_name): Remove wpa_fixup.
+       * lto-wpa-fixup.c: Remove.
+       * Makefile.in (lto-wpa-fixup.o): Remove.
+       * passes.c (init_optimization_passes): Remove pass_ipa_lto_wpa_fixup.
+       (execute_all_ipa_transforms): Set cgraph_state to CGRAPH_STATE_IPA_SSA.
+       * lto-streamer.c (lto_get_section_name): Remove wpa_fixup section.
+
+2010-04-21  Jan Hubicka  <jh@suse.cz>
+
        * tree-pass.h (ipa_opt_pass_d): Rename function_read_summary;
        add write_optimization_summary, read_optimization_summary.
        (ipa_write_summaries_of_cgraph_node_set): Remove.
index 6d081d8..4f2ae4f 100644 (file)
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "flags.h"
 #include "params.h"
 #include "input.h"
+#include "varray.h"
 #include "hashtab.h"
 #include "basic-block.h"
 #include "tree-flow.h"
@@ -42,7 +43,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "lto-streamer.h"
 #include "lto-compress.h"
-#include "ggc.h"
 
 /* Section names.  These must correspond to the values of
    enum lto_section_type.  */
@@ -52,14 +52,10 @@ const char *lto_section_name[LTO_N_SECTION_TYPES] =
   "function_body",
   "static_initializer",
   "cgraph",
-  "varpool",
-  "refs",
-  "jump_funcs"
   "ipa_pure_const",
   "ipa_reference",
   "symtab",
-  "opts",
-  "cgraphopt"
+  "opts"
 };
 
 unsigned char
@@ -435,7 +431,7 @@ lto_new_in_decl_state (void)
 {
   struct lto_in_decl_state *state;
 
-  state = ((struct lto_in_decl_state *) ggc_alloc (sizeof (*state)));
+  state = ((struct lto_in_decl_state *) xmalloc (sizeof (*state)));
   memset (state, 0, sizeof (*state));
   return state;
 }
@@ -449,8 +445,8 @@ lto_delete_in_decl_state (struct lto_in_decl_state *state)
 
   for (i = 0; i < LTO_N_DECL_STREAMS; i++)
     if (state->streams[i].trees)
-      ggc_free (state->streams[i].trees);
-  ggc_free (state);
+      free (state->streams[i].trees);
+  free (state);
 }
 
 /* Hashtable helpers. lto_in_decl_states are hash by their function decls. */
index 74e0650..2ce58d7 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-21  Jan Hubicka  <jh@suse.cz>
 
+       * lto.c (lto_fixup_tree): Do not call wpa fixup.
+       (materialize_cgraph): Likewise.
+
+2010-04-21  Jan Hubicka  <jh@suse.cz>
+
        * lto.c (lto_wpa_write_files): Update.
        (read_cgraph_and_symbols): Be more verbose.
        (materialize_cgraph): Likewise.
index 12475f1..115d1cc 100644 (file)
@@ -1561,28 +1561,6 @@ lto_fixup_tree (tree *tp, int *walk_subtrees, void *data)
 
       if (t != prevailing)
        {
-         if (TREE_CODE (t) == FUNCTION_DECL
-             && TREE_NOTHROW (prevailing) != TREE_NOTHROW (t))
-           {
-             /* If the prevailing definition does not throw but the
-                declaration (T) was considered throwing, then we
-                simply add PREVAILING to the list of throwing
-                functions.  However, if the opposite is true, then
-                the call to PREVAILING was generated assuming that
-                the function didn't throw, which means that CFG
-                cleanup may have removed surrounding try/catch
-                regions.
-
-                Note that we currently accept these cases even when
-                they occur within a single file.  It's certainly a
-                user error, but we silently allow the compiler to
-                remove surrounding try/catch regions.  Perhaps we
-                could emit a warning here, instead of silently
-                accepting the conflicting declaration.  */
-             if (TREE_NOTHROW (prevailing))
-               lto_mark_nothrow_fndecl (prevailing);
-           }
-
           /* Also replace t with prevailing defintion.  We don't want to
              insert the other defintion in the seen set as we want to
              replace all instances of it.  */
@@ -1974,8 +1952,6 @@ materialize_cgraph (void)
   for (i = 0; VEC_iterate (tree, lto_global_var_decls, i, decl); i++)
     rest_of_decl_compilation (decl, 1, 0);
 
-  /* Fix up any calls to DECLs that have become not exception throwing.  */
-  lto_fixup_nothrow_decls ();
   if (!quiet_flag)
     fprintf (stderr, "\n");
 
index d9bf3cc..0c93ef6 100644 (file)
@@ -814,7 +814,6 @@ init_optimization_passes (void)
 
   p = &all_lto_gen_passes;
   NEXT_PASS (pass_ipa_lto_gimple_out);
-  NEXT_PASS (pass_ipa_lto_wpa_fixup);
   NEXT_PASS (pass_ipa_lto_finish_out);  /* This must be the last LTO pass.  */
   *p = NULL;
 
@@ -1487,10 +1486,20 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
 void
 execute_all_ipa_transforms (void)
 {
+  enum cgraph_state old_state = cgraph_state;
   struct cgraph_node *node;
   if (!cfun)
     return;
   node = cgraph_node (current_function_decl);
+
+  /* Statement verification skip verification of nothorw when
+     state is IPA_SSA because we do not modify function bodies
+     after setting the flag on function.  Instead we leave it
+     to fixup_cfg to do such a transformation.  We need to temporarily
+     change the cgraph state so statement verifier before
+     transform do not fire.  */
+  cgraph_state = CGRAPH_STATE_IPA_SSA;
+
   if (node->ipa_transforms_to_apply)
     {
       unsigned int i;
@@ -1504,6 +1513,7 @@ execute_all_ipa_transforms (void)
       VEC_free (ipa_opt_pass, heap, node->ipa_transforms_to_apply);
       node->ipa_transforms_to_apply = NULL;
     }
+  cgraph_state = old_state;
 }
 
 /* Execute PASS. */