* 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
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.
#include "flags.h"
#include "params.h"
#include "input.h"
+#include "varray.h"
#include "hashtab.h"
#include "basic-block.h"
#include "tree-flow.h"
#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. */
"function_body",
"static_initializer",
"cgraph",
- "varpool",
- "refs",
- "jump_funcs"
"ipa_pure_const",
"ipa_reference",
"symtab",
- "opts",
- "cgraphopt"
+ "opts"
};
unsigned char
{
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;
}
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. */
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.
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. */
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");
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;
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;
VEC_free (ipa_opt_pass, heap, node->ipa_transforms_to_apply);
node->ipa_transforms_to_apply = NULL;
}
+ cgraph_state = old_state;
}
/* Execute PASS. */