diff mbox

Remove dead code in omp-low.c

Message ID 1418585658-10812-1-git-send-email-andi@firstfloor.org
State New
Headers show

Commit Message

Andi Kleen Dec. 14, 2014, 7:34 p.m. UTC
From: Andi Kleen <ak@linux.intel.com>

Since the accelerator changes omp_expand_local is not used anymore.
Remove the dead function and another function used by it.

gcc/:

2014-12-14  Andi Kleen  <ak@linux.intel.com>

	* omp-low.c (build_omp_regions_root): Remove dead function.
	(omp_expand_local): Dito.
	* omp-low.h: Dito.
---
 gcc/omp-low.c | 30 ------------------------------
 gcc/omp-low.h |  1 -
 2 files changed, 31 deletions(-)

Comments

Thomas Schwinge April 13, 2016, 8:18 a.m. UTC | #1
Hi!

Ping Andi's patch; I just found the same thing:

On Sun, 14 Dec 2014 11:34:18 -0800, Andi Kleen <andi@firstfloor.org> wrote:
> Since the accelerator changes omp_expand_local is not used anymore.

Specifically,
<http://news.gmane.org/find-root.php?message_id=%3C54635DA8.6030603%40mentor.com%3E>
and thereabouts.  As far as I can tell, Tom's reason to not "remove
omp_expand_local, since [he's] still using that in [his] oacc kernels
directive patch series" no longer applies.

> Remove the dead function and another function used by it.
> 
> gcc/:
> 
> 2014-12-14  Andi Kleen  <ak@linux.intel.com>
> 
> 	* omp-low.c (build_omp_regions_root): Remove dead function.
> 	(omp_expand_local): Dito.
> 	* omp-low.h: Dito.
> ---
>  gcc/omp-low.c | 30 ------------------------------
>  gcc/omp-low.h |  1 -
>  2 files changed, 31 deletions(-)
> 
> diff --git a/gcc/omp-low.c b/gcc/omp-low.c
> index a2e4737..908d280 100644
> --- a/gcc/omp-low.c
> +++ b/gcc/omp-low.c
> @@ -8753,36 +8753,6 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
>      build_omp_regions_1 (son, parent, single_tree);
>  }
>  
> -/* Builds the tree of OMP regions rooted at ROOT, storing it to
> -   root_omp_region.  */
> -
> -static void
> -build_omp_regions_root (basic_block root)
> -{
> -  gcc_assert (root_omp_region == NULL);
> -  build_omp_regions_1 (root, NULL, true);
> -  gcc_assert (root_omp_region != NULL);
> -}
> -
> -/* Expands omp construct (and its subconstructs) starting in HEAD.  */
> -
> -void
> -omp_expand_local (basic_block head)
> -{
> -  build_omp_regions_root (head);
> -  if (dump_file && (dump_flags & TDF_DETAILS))
> -    {
> -      fprintf (dump_file, "\nOMP region tree\n\n");
> -      dump_omp_region (dump_file, root_omp_region, 0);
> -      fprintf (dump_file, "\n");
> -    }
> -
> -  remove_exit_barriers (root_omp_region);
> -  expand_omp (root_omp_region);
> -
> -  free_omp_regions ();
> -}
> -
>  /* Scan the CFG and build a tree of OMP regions.  Return the root of
>     the OMP region tree.  */
>  
> diff --git a/gcc/omp-low.h b/gcc/omp-low.h
> index ac587d0..718e707 100644
> --- a/gcc/omp-low.h
> +++ b/gcc/omp-low.h
> @@ -23,7 +23,6 @@ along with GCC; see the file COPYING3.  If not see
>  struct omp_region;
>  
>  extern tree find_omp_clause (tree, enum omp_clause_code);
> -extern void omp_expand_local (basic_block);
>  extern void free_omp_regions (void);
>  extern tree omp_reduction_init (tree, tree);
>  extern bool make_gimple_omp_edges (basic_block, struct omp_region **, int *);


Grüße
 Thomas
diff mbox

Patch

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index a2e4737..908d280 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -8753,36 +8753,6 @@  build_omp_regions_1 (basic_block bb, struct omp_region *parent,
     build_omp_regions_1 (son, parent, single_tree);
 }
 
-/* Builds the tree of OMP regions rooted at ROOT, storing it to
-   root_omp_region.  */
-
-static void
-build_omp_regions_root (basic_block root)
-{
-  gcc_assert (root_omp_region == NULL);
-  build_omp_regions_1 (root, NULL, true);
-  gcc_assert (root_omp_region != NULL);
-}
-
-/* Expands omp construct (and its subconstructs) starting in HEAD.  */
-
-void
-omp_expand_local (basic_block head)
-{
-  build_omp_regions_root (head);
-  if (dump_file && (dump_flags & TDF_DETAILS))
-    {
-      fprintf (dump_file, "\nOMP region tree\n\n");
-      dump_omp_region (dump_file, root_omp_region, 0);
-      fprintf (dump_file, "\n");
-    }
-
-  remove_exit_barriers (root_omp_region);
-  expand_omp (root_omp_region);
-
-  free_omp_regions ();
-}
-
 /* Scan the CFG and build a tree of OMP regions.  Return the root of
    the OMP region tree.  */
 
diff --git a/gcc/omp-low.h b/gcc/omp-low.h
index ac587d0..718e707 100644
--- a/gcc/omp-low.h
+++ b/gcc/omp-low.h
@@ -23,7 +23,6 @@  along with GCC; see the file COPYING3.  If not see
 struct omp_region;
 
 extern tree find_omp_clause (tree, enum omp_clause_code);
-extern void omp_expand_local (basic_block);
 extern void free_omp_regions (void);
 extern tree omp_reduction_init (tree, tree);
 extern bool make_gimple_omp_edges (basic_block, struct omp_region **, int *);