Make dse.c use offset/width instead of start/end
authorRichard Sandiford <richard.sandiford@linaro.org>
Fri, 15 Dec 2017 13:12:25 +0000 (13:12 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 15 Dec 2017 13:12:25 +0000 (13:12 +0000)
commit71d6a38638e4188974703d3d4ffeeedb1295a70c
tree6d48e167eab27ea9e460decae8ed9dd5cff36f56
parent1eeeda473c577152f6a1a9846b4c0df376622b95
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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255692
gcc/ChangeLog
gcc/dse.c