aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ipa-cp.c20
-rw-r--r--gcc/ipa-fnsummary.c6
-rw-r--r--gcc/langhooks.c2
-rw-r--r--gcc/output.h3
-rw-r--r--gcc/varasm.c9
5 files changed, 14 insertions, 26 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index f981366..028480f 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -5943,22 +5943,6 @@ ipcp_generate_summary (void)
ipa_analyze_node (node);
}
-/* Write ipcp summary for nodes in SET. */
-
-static void
-ipcp_write_summary (void)
-{
- ipa_prop_write_jump_functions ();
-}
-
-/* Read ipcp summary. */
-
-static void
-ipcp_read_summary (void)
-{
- ipa_prop_read_jump_functions ();
-}
-
namespace {
const pass_data pass_data_ipa_cp =
@@ -5980,8 +5964,8 @@ public:
pass_ipa_cp (gcc::context *ctxt)
: ipa_opt_pass_d (pass_data_ipa_cp, ctxt,
ipcp_generate_summary, /* generate_summary */
- ipcp_write_summary, /* write_summary */
- ipcp_read_summary, /* read_summary */
+ NULL, /* write_summary */
+ NULL, /* read_summary */
ipcp_write_transformation_summaries, /*
write_optimization_summary */
ipcp_read_transformation_summaries, /*
diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index f27c5f0..ff05ab6 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -4526,6 +4526,7 @@ ipa_fn_summary_read (void)
struct lto_file_decl_data *file_data;
unsigned int j = 0;
+ ipa_prop_read_jump_functions ();
ipa_fn_summary_alloc ();
while ((file_data = file_data_vec[j++]))
@@ -4544,8 +4545,6 @@ ipa_fn_summary_read (void)
"ipa inline summary is missing in input file");
}
ipa_register_cgraph_hooks ();
- if (!flag_ipa_cp)
- ipa_prop_read_jump_functions ();
gcc_assert (ipa_fn_summaries);
ipa_fn_summaries->enable_insertion_hook ();
@@ -4693,8 +4692,7 @@ ipa_fn_summary_write (void)
produce_asm (ob, NULL);
destroy_output_block (ob);
- if (!flag_ipa_cp)
- ipa_prop_write_jump_functions ();
+ ipa_prop_write_jump_functions ();
}
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 8819a88..d82f542 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -790,7 +790,7 @@ lhd_begin_section (const char *name)
saved_section = text_section;
/* Create a new section and switch to it. */
- section = get_section (name, SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ section = get_section (name, SECTION_DEBUG | SECTION_EXCLUDE, NULL, true);
switch_to_section (section);
}
diff --git a/gcc/output.h b/gcc/output.h
index eb253c5..2f2f169 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -523,7 +523,8 @@ extern GTY(()) bool in_cold_section_p;
extern section *get_unnamed_section (unsigned int, void (*) (const void *),
const void *);
-extern section *get_section (const char *, unsigned int, tree);
+extern section *get_section (const char *, unsigned int, tree,
+ bool not_existing = false);
extern section *get_named_section (tree, const char *, int);
extern section *get_variable_section (tree, bool);
extern void place_block_symbol (rtx);
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ea0b59c..435c7b3 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -277,10 +277,12 @@ get_noswitch_section (unsigned int flags, noswitch_section_callback callback)
}
/* Return the named section structure associated with NAME. Create
- a new section with the given fields if no such structure exists. */
+ a new section with the given fields if no such structure exists.
+ When NOT_EXISTING, then fail if the section already exists. */
section *
-get_section (const char *name, unsigned int flags, tree decl)
+get_section (const char *name, unsigned int flags, tree decl,
+ bool not_existing)
{
section *sect, **slot;
@@ -297,6 +299,9 @@ get_section (const char *name, unsigned int flags, tree decl)
}
else
{
+ if (not_existing)
+ internal_error ("Section already exists: %qs", name);
+
sect = *slot;
/* It is fine if one of the sections has SECTION_NOTYPE as long as
the other has none of the contrary flags (see the logic at the end