On Tue, 2020-08-04 at 13:39 +0200, Aldy Hernandez wrote:
> This patch removes all uses of VR_ANTI_RANGE in DOM. It required
> minor surgery in the switch handling code.
>
> In doing so, I was able to abstract all the code handling the cases
> with ranges into its own function. Interestingly, there is an exact
> copy of this function in VRP, so I was able to use that there too.
>
> I also saw that most of simplify_stmt_for_jump_threading() is
> duplicated in VRP/DOM, but I left that alone. The amount of
> duplicated code in this space is mind boggling.
>
> OK?
>
> gcc/ChangeLog:
>
> * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Abstract code out
> to...
> * tree-vrp.c (find_case_label_range): ...here. Rewrite for to use
> irange
> API.
> (simplify_stmt_for_jump_threading): Call find_case_label_range instead
> of
> duplicating the code in simplify_stmt_for_jump_threading.
> * tree-vrp.h (find_case_label_range): New prototype.
OK
jeff
>