Commit b3e46655 by Alan Lawrence Committed by Alan Lawrence

Empty the redirect_edge_var_map after each pass

	Alan Lawrence  <alan.lawrence@arm.com>
	Richard Biener  <richard.guenther@gmail.com>

	* cfgexpand.c (pass_expand::execute): Replace call to
	redirect_edge_var_map_destroy with redirect_edge_var_map_empty.
	* tree-ssa.c (delete_tree_ssa): Likewise.
	* function.c (set_cfun): Call redirect_edge_var_map_empty.
	* passes.c (execute_one_ipa_transform_pass, execute_one_pass): Likewise.
	* tree-ssa.h (redirect_edge_var_map_destroy): Remove.
	(redirect_edge_var_map_empty): New.
	* tree-ssa.c (redirect_edge_var_map_destroy): Remove.
	(redirect_edge_var_map_empty): New.

Co-Authored-By: Richard Biener <richard.guenther@gmail.com>

From-SVN: r231232
parent 46bd784b
2015-12-03 Alan Lawrence <alan.lawrence@arm.com>
Richard Biener <richard.guenther@gmail.com>
* cfgexpand.c (pass_expand::execute): Replace call to
redirect_edge_var_map_destroy with redirect_edge_var_map_empty.
* tree-ssa.c (delete_tree_ssa): Likewise.
* function.c (set_cfun): Call redirect_edge_var_map_empty.
* passes.c (execute_one_ipa_transform_pass, execute_one_pass): Likewise.
* tree-ssa.h (redirect_edge_var_map_destroy): Remove.
(redirect_edge_var_map_empty): New.
* tree-ssa.c (redirect_edge_var_map_destroy): Remove.
(redirect_edge_var_map_empty): New.
2015-12-03 Jeff Law <law@redhat.com>
PR tree-optimization/68599
......@@ -6294,7 +6294,7 @@ pass_expand::execute (function *fun)
expand_phi_nodes (&SA);
/* Release any stale SSA redirection data. */
redirect_edge_var_map_destroy ();
redirect_edge_var_map_empty ();
/* Register rtl specific functions for cfg. */
rtl_register_cfg_hooks ();
......
......@@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-chkp.h"
#include "rtl-chkp.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
/* So we can assign to cfun in this file. */
#undef cfun
......@@ -4798,6 +4799,7 @@ set_cfun (struct function *new_cfun)
{
cfun = new_cfun;
invoke_set_current_function_hook (new_cfun ? new_cfun->decl : NULL_TREE);
redirect_edge_var_map_empty ();
}
}
......
......@@ -2218,6 +2218,7 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
pass_fini_dump_file (pass);
current_pass = NULL;
redirect_edge_var_map_empty ();
/* Signal this is a suitable GC collection point. */
if (!(todo_after & TODO_do_not_ggc_collect))
......@@ -2370,6 +2371,7 @@ execute_one_pass (opt_pass *pass)
|| pass->type != RTL_PASS);
current_pass = NULL;
redirect_edge_var_map_empty ();
if (todo_after & TODO_discard_function)
{
......
......@@ -119,10 +119,10 @@ redirect_edge_var_map_vector (edge e)
/* Clear the edge variable mappings. */
void
redirect_edge_var_map_destroy (void)
redirect_edge_var_map_empty (void)
{
delete edge_var_maps;
edge_var_maps = NULL;
if (edge_var_maps)
edge_var_maps->empty ();
}
......@@ -1128,7 +1128,7 @@ delete_tree_ssa (struct function *fn)
fn->gimple_df = NULL;
/* We no longer need the edge variable maps. */
redirect_edge_var_map_destroy ();
redirect_edge_var_map_empty ();
}
/* Return true if EXPR is a useless type conversion, otherwise return
......
......@@ -35,7 +35,7 @@ extern void redirect_edge_var_map_add (edge, tree, tree, source_location);
extern void redirect_edge_var_map_clear (edge);
extern void redirect_edge_var_map_dup (edge, edge);
extern vec<edge_var_map> *redirect_edge_var_map_vector (edge);
extern void redirect_edge_var_map_destroy (void);
extern void redirect_edge_var_map_empty (void);
extern edge ssa_redirect_edge (edge, basic_block);
extern void flush_pending_stmts (edge);
extern void gimple_replace_ssa_lhs (gimple *, tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment