public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5467] inliner: Remove unused transform_lang_insert_block hook
@ 2021-11-23 10:03 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2021-11-23 10:03 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2780484bc376a89edb0c97b6b85209f4c27f34ee

commit r12-5467-g2780484bc376a89edb0c97b6b85209f4c27f34ee
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Nov 23 11:02:54 2021 +0100

    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.

Diff:
---
 gcc/c/c-typeck.c   | 1 -
 gcc/cp/optimize.c  | 1 -
 gcc/cp/semantics.c | 1 -
 gcc/gimplify.c     | 1 -
 gcc/tree-inline.c  | 8 --------
 gcc/tree-inline.h  | 3 ---
 6 files changed, 15 deletions(-)

diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 50d70104766..b71358e1821 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -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;
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 22ed7d357ee..e6fd27f1092 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -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;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index d962b290211..79b8162ef1e 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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;
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 8e0adbe7484..816cdaf8a18 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -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);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 8c108d8e4e7..bc5ff0bb052 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -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.  */
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index ec0e82fe865..e9d21a44d2f 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-23 10:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 10:03 [gcc r12-5467] inliner: Remove unused transform_lang_insert_block hook Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).