]> gcc.gnu.org Git - gcc.git/commit
Rewrite bounds_of_var_in_loop() to use ranges.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 17 Feb 2023 12:00:47 +0000 (13:00 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 1 May 2023 06:33:15 +0000 (08:33 +0200)
commit47a7643991192a756d0fb9057a0a2bfce338a09f
tree25da3c9677bf4f8ec4187b093f25194b0717e60d
parent8b2181a415fda05c48a13f915cc42214462d19cb
Rewrite bounds_of_var_in_loop() to use ranges.

Little by little, bounds_of_var_in_loop() has grown into an
unmaintainable mess.  This patch rewrites the code to use the relevant
APIs as well as refactor it to make it more readable.

gcc/ChangeLog:

* gimple-range-fold.cc (tree_lower_bound): Delete.
(tree_upper_bound): Delete.
(vrp_val_max): Delete.
(vrp_val_min): Delete.
(fold_using_range::range_of_ssa_name_with_loop_info): Call
range_of_var_in_loop.
* vr-values.cc (valid_value_p): Delete.
(fix_overflow): Delete.
(get_scev_info): New.
(bounds_of_var_in_loop): Refactor into...
(induction_variable_may_overflow_p): ...this,
(range_from_loop_direction): ...and this,
(range_of_var_in_loop): ...and this.
* vr-values.h (bounds_of_var_in_loop): Delete.
(range_of_var_in_loop): New.
gcc/gimple-range-fold.cc
gcc/vr-values.cc
gcc/vr-values.h
This page took 0.066036 seconds and 6 git commands to generate.