This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Clear SSA_NAME_ANTI_RANGE_P when appropriate (PR tree-optimization/67821)
- From: Marek Polacek <polacek at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 5 Oct 2015 18:30:37 +0200
- Subject: Re: [PATCH] Clear SSA_NAME_ANTI_RANGE_P when appropriate (PR tree-optimization/67821)
- Authentication-results: sourceware.org; auth=none
- References: <20151005135323 dot GK6184 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1510051605430 dot 6516 at zhemvz dot fhfr dot qr> <20151005142544 dot GL6184 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1510051626150 dot 6516 at zhemvz dot fhfr dot qr> <20151005144644 dot GM6184 at redhat dot com> <99F0759E-A030-4545-94E8-8E993385142D at suse dot de>
On Mon, Oct 05, 2015 at 06:27:53PM +0200, Richard Biener wrote:
> On October 5, 2015 4:46:44 PM GMT+02:00, Marek Polacek <polacek@redhat.com> wrote:
> >On Mon, Oct 05, 2015 at 04:26:49PM +0200, Richard Biener wrote:
> >> > > Otherwise other setters of SSA_NAME_RANGE_INFO would need to make
> >> > > sure SSA_NAME_ANTI_RANGE_P is cleared as well.
> >> >
> >> > They mostly do, if I'm looking right, e.g.
> >> > tree-ssa-phiopt.c:1016
> >> > tree-ssa-loop-im.c:1224
> >> > tree-ssa-loop-im.c:1294
> >> > and I've also seen
> >> > <https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00127.html>.
> >>
> >> Those would be redundant then.
> >
> >I can give this a whirl (as a follow-up)...
>
> OK for trunk.
Thanks. Just for the record, I've succefully regtested/bootstrapped this
patch on x86_64-linux. Applying to trunk.
> >2015-10-05 Marek Polacek <polacek@redhat.com>
> >
> > * tree-ssa-loop-im.c
> > (move_computations_dom_walker::before_dom_children): Don't set
> > SSA_NAME_ANTI_RANGE_P.
> > * tree-ssa-phiopt.c (value_replacement): Likewise.
> >
> >diff --git gcc/tree-ssa-loop-im.c gcc/tree-ssa-loop-im.c
> >index f3389a0..9b2436f 100644
> >--- gcc/tree-ssa-loop-im.c
> >+++ gcc/tree-ssa-loop-im.c
> >@@ -1222,7 +1222,6 @@ move_computations_dom_walker::before_dom_children
> >(basic_block bb)
> > {
> > tree lhs = gimple_assign_lhs (new_stmt);
> > SSA_NAME_RANGE_INFO (lhs) = NULL;
> >- SSA_NAME_ANTI_RANGE_P (lhs) = 0;
> > }
> > gsi_insert_on_edge (loop_preheader_edge (level), new_stmt);
> > remove_phi_node (&bsi, false);
> >@@ -1292,7 +1291,6 @@ move_computations_dom_walker::before_dom_children
> >(basic_block bb)
> > {
> > tree lhs = gimple_get_lhs (stmt);
> > SSA_NAME_RANGE_INFO (lhs) = NULL;
> >- SSA_NAME_ANTI_RANGE_P (lhs) = 0;
> > }
> > /* In case this is a stmt that is not unconditionally executed
> > when the target loop header is executed and the stmt may
> >diff --git gcc/tree-ssa-phiopt.c gcc/tree-ssa-phiopt.c
> >index 697836a..f33ca5c 100644
> >--- gcc/tree-ssa-phiopt.c
> >+++ gcc/tree-ssa-phiopt.c
> >@@ -1014,7 +1014,6 @@ value_replacement (basic_block cond_bb,
> >basic_block middle_bb,
> > <bb 4>:
> > # u_3 = PHI <u_6(3), 4294967295(2)> */
> > SSA_NAME_RANGE_INFO (lhs) = NULL;
> >- SSA_NAME_ANTI_RANGE_P (lhs) = 0;
> > /* If available, we can use VR of phi result at least. */
> > tree phires = gimple_phi_result (phi);
> > struct range_info_def *phires_range_info
Marek