Make dse.c use offset/width instead of start/end
commit57bca8dcc1e6103bbfb3b83c90fcbb8ee07d53a5
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Dec 2017 13:12:25 +0000 (15 13:12 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Dec 2017 13:12:25 +0000 (15 13:12 +0000)
tree6d48e167eab27ea9e460decae8ed9dd5cff36f56
parent3ee06931b081190c229de315b1b5102d6382bef5
Make dse.c use offset/width instead of start/end

store_info and read_info_type in dse.c represented the ranges as
start/end, but a lot of the internal code used offset/width instead.
Using offset/width throughout fits better with the poly_int.h
range-checking functions.

2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* dse.c (store_info, read_info_type): Replace begin and end with
offset and width.
(print_range): New function.
(set_all_positions_unneeded, any_positions_needed_p)
(check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
accordingly.
(record_store): Likewise.  Optimize the case in which all positions
are unneeded.
(get_stored_val): Replace read_begin and read_end with read_offset
and read_width.
(replace_read): Update call accordingly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255692 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/dse.c