inliner: Remove unused transform_lang_insert_block hook

This struct copy_body_data's hook is always NULL since merge
of the tuples branch, before that it has been shortly used by the C++
FE during ctor/dtor cloning to chain the remapped blocks, but only
very shortly, before transform_lang_insert_block was a bool and
the call to insert_block was done through a langhook.
I'd say that for something that hasn't been used since 4.4 there is
zero chance we'll want to use it again in the near future.

2021-11-23  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* tree-inline.h (struct copy_body_data): Remove
	transform_lang_insert_block member.
	* tree-inline.c (remap_block): Don't call
	id->transform_lang_insert_block.
	(optimize_inline_calls, copy_gimple_seq_and_replace_locals,
	tree_function_versioning, maybe_inline_call_in_expr,
	copy_fn): Don't initialize id.transform_lang_insert_block.
	* gimplify.c (gimplify_omp_loop): Likewise.
gcc/c/
	* c-typeck.c (c_clone_omp_udr): Don't initialize
	id.transform_lang_insert_block.
gcc/cp/
	* semantics.c (clone_omp_udr): Don't initialize
	id.transform_lang_insert_block.
	* optimize.c (clone_body): Likewise.
This commit is contained in:
Jakub Jelinek 2021-11-23 11:02:54 +01:00
parent 6033b27ead
commit 2780484bc3
6 changed files with 0 additions and 15 deletions

View file

@ -13848,7 +13848,6 @@ c_clone_omp_udr (tree stmt, tree omp_decl1, tree omp_decl2,
id.transform_call_graph_edges = CB_CGE_DUPLICATE;
id.transform_new_cfg = true;
id.transform_return_to_modify = false;
id.transform_lang_insert_block = NULL;
id.eh_lp_nr = 0;
walk_tree (&stmt, copy_tree_body_r, &id, NULL);
return stmt;

View file

@ -103,7 +103,6 @@ clone_body (tree clone, tree fn, void *arg_map)
id.transform_call_graph_edges = CB_CGE_DUPLICATE;
id.transform_new_cfg = true;
id.transform_return_to_modify = false;
id.transform_lang_insert_block = NULL;
/* We're not inside any EH region. */
id.eh_lp_nr = 0;

View file

@ -6066,7 +6066,6 @@ clone_omp_udr (tree stmt, tree omp_decl1, tree omp_decl2,
id.transform_call_graph_edges = CB_CGE_DUPLICATE;
id.transform_new_cfg = true;
id.transform_return_to_modify = false;
id.transform_lang_insert_block = NULL;
id.eh_lp_nr = 0;
walk_tree (&stmt, copy_tree_body_r, &id, NULL);
return stmt;

View file

@ -13413,7 +13413,6 @@ gimplify_omp_loop (tree *expr_p, gimple_seq *pre_p)
id.transform_call_graph_edges = CB_CGE_DUPLICATE;
id.transform_new_cfg = true;
id.transform_return_to_modify = false;
id.transform_lang_insert_block = NULL;
id.eh_lp_nr = 0;
walk_tree (&OMP_CLAUSE_REDUCTION_INIT (*pc), copy_tree_body_r,
&id, NULL);

View file

@ -823,9 +823,6 @@ remap_block (tree *block, copy_body_data *id)
&BLOCK_NONLOCALIZED_VARS (new_block),
id);
if (id->transform_lang_insert_block)
id->transform_lang_insert_block (new_block);
/* Remember the remapped block. */
insert_decl_map (id, old_block, new_block);
}
@ -5473,7 +5470,6 @@ optimize_inline_calls (tree fn)
id.transform_new_cfg = false;
id.transform_return_to_modify = true;
id.transform_parameter = true;
id.transform_lang_insert_block = NULL;
id.statements_to_fold = new hash_set<gimple *>;
push_gimplify_context ();
@ -5857,7 +5853,6 @@ copy_gimple_seq_and_replace_locals (gimple_seq seq)
id.transform_new_cfg = false;
id.transform_return_to_modify = false;
id.transform_parameter = false;
id.transform_lang_insert_block = NULL;
/* Walk the tree once to find local labels. */
memset (&wi, 0, sizeof (wi));
@ -6252,7 +6247,6 @@ tree_function_versioning (tree old_decl, tree new_decl,
id.transform_new_cfg = true;
id.transform_return_to_modify = false;
id.transform_parameter = false;
id.transform_lang_insert_block = NULL;
old_entry_block = ENTRY_BLOCK_PTR_FOR_FN
(DECL_STRUCT_FUNCTION (old_decl));
@ -6541,7 +6535,6 @@ maybe_inline_call_in_expr (tree exp)
id.transform_new_cfg = false;
id.transform_return_to_modify = true;
id.transform_parameter = true;
id.transform_lang_insert_block = NULL;
/* Make sure not to unshare trees behind the front-end's back
since front-end specific mechanisms may rely on sharing. */
@ -6613,7 +6606,6 @@ copy_fn (tree fn, tree& parms, tree& result)
id.transform_new_cfg = false;
id.transform_return_to_modify = false;
id.transform_parameter = true;
id.transform_lang_insert_block = NULL;
/* Make sure not to unshare trees behind the front-end's back
since front-end specific mechanisms may rely on sharing. */

View file

@ -133,9 +133,6 @@ struct copy_body_data
and only in that case will actually remap the type. */
bool dont_remap_vla_if_no_change;
/* A function to be called when duplicating BLOCK nodes. */
void (*transform_lang_insert_block) (tree);
/* Statements that might be possibly folded. */
hash_set<gimple *> *statements_to_fold;