aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-10-26 11:24:33 +0100
committerJan Hubicka <jh@suse.cz>2020-10-26 11:24:33 +0100
commit40e67ab8e59cf1c558f2818625c7e06dbf7a8e50 (patch)
treea949d436af2b24b4dcf1d15dd96045e6ec8f7f9b /gcc/ipa-prop.h
parentdc7824734e6589bac2ba0f8363d24d50da8cfeae (diff)
downloadgcc-40e67ab8e59cf1c558f2818625c7e06dbf7a8e50.zip
gcc-40e67ab8e59cf1c558f2818625c7e06dbf7a8e50.tar.gz
gcc-40e67ab8e59cf1c558f2818625c7e06dbf7a8e50.tar.bz2
Make default duplicate and insert methods of summaries abort; fix fallout
the default duplicate and insert methods of sumaries produce empty summary that is not useful for anything and makes it easy to introduce bugs. This patch makes the default hooks to abort and summaries that do not need dupicaito/insertion disable the corresponding hooks. I also implemented missing insertion hook for ipa-sra which forced me to move analysis out of anonymous namespace. 2020-10-23 Jan Hubicka <hubicka@ucw.cz> * cgraph.h (struct cgraph_node): Make ipa_transforms_to_apply vl_ptr. * ipa-inline-analysis.c (initialize_growth_caches): Disable insertion and duplication hooks. * ipa-inline-transform.c (clone_inlined_nodes): Clear ipa_transforms_to_apply. (save_inline_function_body): Disable insertion hoook for ipa_saved_clone_sources. * ipa-prop.c (ipcp_transformation_initialize): Disable insertion hook. * ipa-prop.h (ipa_node_params_t): Disable insertion hook. * ipa-reference.c (propagate): Disable insertion hoook. * ipa-sra.c (ipa_sra_summarize_function): Move out of anonymous namespace. (ipa_sra_function_summaries::insert): New virtual function. * passes.c (execute_one_pass): Do not add transforms to inline clones. * symbol-summary.h (function_summary_base): Make insert and duplicate hooks fail instead of silently producing empty summaries; add way to disable duplication hooks (call_summary_base): Likewise. * tree-nested.c (nested_function_info::get_create): Disable insertion hooks (maybe_record_nested_function): Likewise.
Diffstat (limited to 'gcc/ipa-prop.h')
-rw-r--r--gcc/ipa-prop.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 0bbbbf9..77e92b0 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -941,7 +941,10 @@ class GTY((user)) ipa_node_params_t: public function_summary <ipa_node_params *>
{
public:
ipa_node_params_t (symbol_table *table, bool ggc):
- function_summary<ipa_node_params *> (table, ggc) { }
+ function_summary<ipa_node_params *> (table, ggc)
+ {
+ disable_insertion_hook ();
+ }
/* Hook that is called by summary when a node is duplicated. */
virtual void duplicate (cgraph_node *node,