diff mbox series

[RFA] 9/n Finish moving BB_VISITED handling into range analyzer

Message ID 888a1033-3bfe-aa25-534f-3bfdcb43f8e9@redhat.com
State New
Headers show
Series [RFA] 9/n Finish moving BB_VISITED handling into range analyzer | expand

Commit Message

Jeff Law Nov. 18, 2017, 8:05 a.m. UTC
I didn't want to rebase my patchset yet again to fix this minor goof.  I
moved initialization of BB_VISITED into the range analyzer, but forgot
to move setting it as we visit each block into the analyzer.

This fixes that oversight.

Bootstrapped and regression tested on x86.

OK for the trunk?

Jeff
* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
	set BB_VISITED here.
	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Set
	BB_VISITED here instead.

commit 0455c00f320dc1136ca742e46ca5a184e144b0e6
Author: Jeff Law <law@torsion.usersys.redhat.com>
Date:   Fri Nov 17 15:15:36 2017 -0500

    FIx bb_visited handling

Comments

Richard Biener Nov. 20, 2017, 10:05 a.m. UTC | #1
On Sat, Nov 18, 2017 at 9:05 AM, Jeff Law <law@redhat.com> wrote:
>
> I didn't want to rebase my patchset yet again to fix this minor goof.  I
> moved initialization of BB_VISITED into the range analyzer, but forgot
> to move setting it as we visit each block into the analyzer.
>
> This fixes that oversight.
>
> Bootstrapped and regression tested on x86.
>
> OK for the trunk?

Ok.

Richard.

> Jeff
>
>         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
>         set BB_VISITED here.
>         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Set
>         BB_VISITED here instead.
>
> commit 0455c00f320dc1136ca742e46ca5a184e144b0e6
> Author: Jeff Law <law@torsion.usersys.redhat.com>
> Date:   Fri Nov 17 15:15:36 2017 -0500
>
>     FIx bb_visited handling
>
> diff --git a/gcc/gimple-ssa-evrp-analyze.c b/gcc/gimple-ssa-evrp-analyze.c
> index 4f33c644a74..9e581834d08 100644
> --- a/gcc/gimple-ssa-evrp-analyze.c
> +++ b/gcc/gimple-ssa-evrp-analyze.c
> @@ -61,6 +61,7 @@ evrp_range_analyzer::enter (basic_block bb)
>    stack.safe_push (std::make_pair (NULL_TREE, (value_range *)NULL));
>    record_ranges_from_incoming_edge (bb);
>    record_ranges_from_phis (bb);
> +  bb->flags |= BB_VISITED;
>  }
>
>  /* Find new range for NAME such that (OP CODE LIMIT) is true.  */
> diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c
> index 5fa9cfb3538..27a983dd9ae 100644
> --- a/gcc/gimple-ssa-evrp.c
> +++ b/gcc/gimple-ssa-evrp.c
> @@ -228,8 +228,6 @@ evrp_dom_walker::before_dom_children (basic_block bb)
>         }
>      }
>
> -  bb->flags |= BB_VISITED;
> -
>    return taken_edge;
>  }
>
>
diff mbox series

Patch

diff --git a/gcc/gimple-ssa-evrp-analyze.c b/gcc/gimple-ssa-evrp-analyze.c
index 4f33c644a74..9e581834d08 100644
--- a/gcc/gimple-ssa-evrp-analyze.c
+++ b/gcc/gimple-ssa-evrp-analyze.c
@@ -61,6 +61,7 @@  evrp_range_analyzer::enter (basic_block bb)
   stack.safe_push (std::make_pair (NULL_TREE, (value_range *)NULL));
   record_ranges_from_incoming_edge (bb);
   record_ranges_from_phis (bb);
+  bb->flags |= BB_VISITED;
 }
 
 /* Find new range for NAME such that (OP CODE LIMIT) is true.  */
diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c
index 5fa9cfb3538..27a983dd9ae 100644
--- a/gcc/gimple-ssa-evrp.c
+++ b/gcc/gimple-ssa-evrp.c
@@ -228,8 +228,6 @@  evrp_dom_walker::before_dom_children (basic_block bb)
 	}
     }
  
-  bb->flags |= BB_VISITED;
-
   return taken_edge;
 }