aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-02-03 09:20:02 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-02-03 08:20:02 +0000
commite806796de03b50f1b8cddaa6e0696ab652f268ef (patch)
treefdc17253740fdcce9e854af3c077c20bd504fc47 /gcc/ipa-prop.c
parent6d5b4f9e713a7e6804d589dfef76ce8cad3d0f02 (diff)
downloadgcc-e806796de03b50f1b8cddaa6e0696ab652f268ef.zip
gcc-e806796de03b50f1b8cddaa6e0696ab652f268ef.tar.gz
gcc-e806796de03b50f1b8cddaa6e0696ab652f268ef.tar.bz2
Fix memory leaks in IPA CP (PR ipa/79337).
2017-02-03 Martin Liska <mliska@suse.cz> PR ipa/79337 * ipa-prop.c (ipa_node_params_t::insert): Remove current implementation. (ipa_node_params_t::remove): Likewise. * ipa-prop.h (ipa_node_params::ipa_node_params): Make default initialization from removed ipa_node_params_t::insert. (ipa_node_params::~ipa_node_params): Move from removed ipa_node_params_t::release. * symbol-summary.h (symbol_summary::m_released): New member. Do not release a summary twice. Do not allow to call finalizer for types of a summary that live in GGC memory. From-SVN: r245145
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 3ef3d4f..d031a70 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3736,38 +3736,6 @@ ipa_add_new_function (cgraph_node *node, void *data ATTRIBUTE_UNUSED)
ipa_analyze_node (node);
}
-/* Initialize a newly created param info. */
-
-void
-ipa_node_params_t::insert (cgraph_node *, ipa_node_params *info)
-{
- info->lattices = NULL;
- info->ipcp_orig_node = NULL;
- info->known_csts = vNULL;
- info->known_contexts = vNULL;
- info->analysis_done = 0;
- info->node_enqueued = 0;
- info->do_clone_for_all_contexts = 0;
- info->is_all_contexts_clone = 0;
- info->node_dead = 0;
- info->node_within_scc = 0;
- info->node_calling_single_call = 0;
- info->versionable = 0;
-}
-
-/* Frees all dynamically allocated structures that the param info points
- to. */
-
-void
-ipa_node_params_t::remove (cgraph_node *, ipa_node_params *info)
-{
- free (info->lattices);
- /* Lattice values and their sources are deallocated with their alocation
- pool. */
- info->known_csts.release ();
- info->known_contexts.release ();
-}
-
/* Hook that is called by summary when a node is duplicated. */
void