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

--- Comment #16 from Marc Glisse <glisse at gcc dot gnu.org> 2012-05-07 
14:46:03 UTC ---
(In reply to comment #15)
> Looking at your second patch it looks entirely reasonable, though not
> globbing MULT_EXPR together with PLUS/MINUS might be better for readability

I wondered about that (you can still find the patch (marked as obsolete)
without MULT_EXPR in the bug report, for comparison), and thought that the
amount of code shared was more important than separating, but it isn't hard to
unshare it if you find that better ;-)

> (thus, in the end I'd like extract_range_from_binary_expr_1 to be a big
> switch-case on the operation code).

I was indeed unhappy about breaking that structure.

> I didn't finish refactoring the code when I last touched it - 
> the idea was to have primitives for range arithmetic.

Good idea. I admit that I am scared of doing changes that are not completely
local, as I don't have a global understanding of how things work, hence my very
localized patches...

> I've looked at my own pending patch and it doesn't look as nicely structured
> as yours.

At least the patch you have attached to the bug is complementary to what I
posted, and something like it is still very much needed.

What do you think is the best way forward? I am happy to let you refactor
things the way you like and adapt this patch in a few months/years if it is
still useful. I only looked at VRP in case it could help for PR53100, but that
doesn't seem so easy...

Reply via email to