[Bug tree-optimization/26406] Fowardprop does harm for VRP to figure out if a point is non zero

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Feb 22 16:23:00 GMT 2006



------- Comment #10 from law at redhat dot com  2006-02-22 16:22 -------
Subject: Re:  Fowardprop does harm for VRP to
        figure out if a point is non zero

On Wed, 2006-02-22 at 12:47 +0000, rguenth at gcc dot gnu dot org wrote:
A little history...

DOM was pretty clever in that it had the ability to backwards
propagate some non-null ranges.  That code was written to make
DOM's non-null tracking relatively immune to things like comparison
simplification.  It was quick, simple and relatively effective.

We *really* don't want to do that in VRP.  First it violates a
fundamental principle designed to ensure VRP terminates.  Namely
that we don't move backward in the lattice.  ie, we don't allow
VR_VARYING -> VR_RANGE/VR_ANTI_RANGE state transitions.

I briefly toyed with the idea of doing the backward range
propagation after all the forward propagation was done, but
before substitution/simplifications.  There's a handful of
implementation issues with this approach and it will likely
result in a measurable compile-time hit due to the extra
ASSERT_EXPRs.  It's something I'm still pondering, but it's
not my favored solution ATM.


What I'm seriously looking at and still evaluating is 
delaying the forwprop pass.  For the initial stuff I looked
at it seems like a *much* better solution -- not only does
it allow VRP to catch more of the non-null stuff, but it
seems to help forwprop and the following DOM pass as well.
I'll be returning to this once we've reached closure on the
Ada regressions.

jeff


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26406



More information about the Gcc-bugs mailing list