diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-07-26 11:53:41 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-07-26 13:40:15 +0200 |
commit | 32f7506bdc3956762bcc7dc84133fd7c3a00bb7b (patch) | |
tree | 8440f5a2f5a13c70852c862b807138b8bbb1b6c3 /gcc/fortran/trans-expr.c | |
parent | dd44445f09bcf92198e9238a28bf026959152be1 (diff) | |
download | gcc-32f7506bdc3956762bcc7dc84133fd7c3a00bb7b.zip gcc-32f7506bdc3956762bcc7dc84133fd7c3a00bb7b.tar.gz gcc-32f7506bdc3956762bcc7dc84133fd7c3a00bb7b.tar.bz2 |
Abstract out conditional simplification out of execute_vrp.
VRP simplifies conditionals involving casted values outside of the main
folding mechanism, because this optimization inhibits the VRP jump
threader from threading through the comparison.
As part of replacing VRP with an evrp instance, I am making sure we do
everything VRP does. Hence, I am abstracting this functionality out so
we can call it from from elsewhere.
ISTM that when the proposed ranger-based jump threader can handle
everything the forward threader does, there will be no need for this
optimization to be done outside of the evrp folder. Perhaps we can fold
this into the substitute_using_ranges class. But that's further down
the line.
Also, there is no need to pass a vr_values around, when the base
range_query class will do. I fixed this, at it makes it trivial to pass
down a ranger or evrp instance.
Tested on x86-64 Linux.
gcc/ChangeLog:
* tree-vrp.c (vrp_simplify_cond_using_ranges): Rename vr_values
with range_query.
(execute_vrp): Abstract out simplification of conditionals...
(simplify_casted_conds): ...here.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions