Use FOR_ALL_BB_FN in a few more places

Thomas Schwinge thomas@codesourcery.com
Tue Oct 18 19:39:00 GMT 2016


Hi!

On Tue, 18 Oct 2016 07:38:17 +0200, Richard Biener <rguenther@suse.de> wrote:
> On October 17, 2016 6:09:02 PM GMT+02:00, Thomas Schwinge <thomas@codesourcery.com> wrote:
> >[FOR_ALL_BB_FN]
> >
> >We could use the former in a few more places; OK for trunk once tested?
> 
> OK.

As posted, committed to trunk in r241315:

commit 195917446a84dd216ec19c6657b298dcb57e039d
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Oct 18 19:36:45 2016 +0000

    Use FOR_ALL_BB_FN in a few more places
    
    	gcc/
    	* cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN.
    	* config/nvptx/nvptx.c (nvptx_find_sese): Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241315 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog            | 5 +++++
 gcc/cfg.c                | 2 +-
 gcc/config/nvptx/nvptx.c | 8 +-------
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git gcc/ChangeLog gcc/ChangeLog
index 4922809..6002dde 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-18  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN.
+	* config/nvptx/nvptx.c (nvptx_find_sese): Likewise.
+
 2016-10-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
 
 	* config/rs6000/altivec.h (vec_xl_len): New macro.
diff --git gcc/cfg.c gcc/cfg.c
index ee2e42c..6604b02 100644
--- gcc/cfg.c
+++ gcc/cfg.c
@@ -386,7 +386,7 @@ clear_bb_flags (void)
 {
   basic_block bb;
 
-  FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), NULL, next_bb)
+  FOR_ALL_BB_FN (bb, cfun)
     bb->flags &= BB_FLAGS_TO_PRESERVE;
 }
 

diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c
index 6ec8eb4..80fa9ae 100644
--- gcc/config/nvptx/nvptx.c
+++ gcc/config/nvptx/nvptx.c
@@ -3091,17 +3091,11 @@ nvptx_find_sese (auto_vec<basic_block> &blocks, bb_pair_vec_t &regions)
   int ix;
 
   /* First clear each BB of the whole function.  */ 
-  FOR_EACH_BB_FN (block, cfun)
+  FOR_ALL_BB_FN (block, cfun)
     {
       block->flags &= ~BB_VISITED;
       BB_SET_SESE (block, 0);
     }
-  block = EXIT_BLOCK_PTR_FOR_FN (cfun);
-  block->flags &= ~BB_VISITED;
-  BB_SET_SESE (block, 0);
-  block = ENTRY_BLOCK_PTR_FOR_FN (cfun);
-  block->flags &= ~BB_VISITED;
-  BB_SET_SESE (block, 0);
 
   /* Mark blocks in the function that are in this graph.  */
   for (ix = 0; blocks.iterate (ix, &block); ix++)


Grüße
 Thomas



More information about the Gcc-patches mailing list