diff options
author | Richard Biener <rguenther@suse.de> | 2019-07-04 13:56:12 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-07-04 13:56:12 +0000 |
commit | e57c896e86c4257741b574d99d7cacbfda219755 (patch) | |
tree | eefa1b0cc672ec65c4f32d9cfa4e91c878d4c478 /gcc/passes.c | |
parent | 5cee32399049534903f3ddb0bf55657b909492f4 (diff) | |
download | gcc-e57c896e86c4257741b574d99d7cacbfda219755.zip gcc-e57c896e86c4257741b574d99d7cacbfda219755.tar.gz gcc-e57c896e86c4257741b574d99d7cacbfda219755.tar.bz2 |
re PR ipa/91062 (gcc.dg/ipa/ipa-pta-1.c dump contains garbage when gcc was configured with --enable-checking=all)
2019-07-04 Richard Biener <rguenther@suse.de>
PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.
From-SVN: r273083
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index c6331cb..bd56004 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -2182,7 +2182,7 @@ execute_ipa_summary_passes (ipa_opt_pass_d *ipa_pass) static void execute_one_ipa_transform_pass (struct cgraph_node *node, - ipa_opt_pass_d *ipa_pass) + ipa_opt_pass_d *ipa_pass, bool do_not_collect) { opt_pass *pass = ipa_pass; unsigned int todo_after = 0; @@ -2228,14 +2228,14 @@ execute_one_ipa_transform_pass (struct cgraph_node *node, redirect_edge_var_map_empty (); /* Signal this is a suitable GC collection point. */ - if (!(todo_after & TODO_do_not_ggc_collect)) + if (!do_not_collect && !(todo_after & TODO_do_not_ggc_collect)) ggc_collect (); } /* For the current function, execute all ipa transforms. */ void -execute_all_ipa_transforms (void) +execute_all_ipa_transforms (bool do_not_collect) { struct cgraph_node *node; if (!cfun) @@ -2247,7 +2247,8 @@ execute_all_ipa_transforms (void) unsigned int i; for (i = 0; i < node->ipa_transforms_to_apply.length (); i++) - execute_one_ipa_transform_pass (node, node->ipa_transforms_to_apply[i]); + execute_one_ipa_transform_pass (node, node->ipa_transforms_to_apply[i], + do_not_collect); node->ipa_transforms_to_apply.release (); } } |