Cleanup autopref scheduling
commitf9f43fb3a83af7dc6b2f89d6691ccd33b0b90196
authorWilco Dijkstra <wdijkstr@arm.com>
Tue, 24 Oct 2017 17:21:19 +0000 (24 17:21 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Tue, 24 Oct 2017 17:21:19 +0000 (24 17:21 +0000)
tree92d7b65abfd2bb2d39f8c3fd72241927eefe1ece
parentacea40ac746971daf5b9e6091b908653407b86ea
Cleanup autopref scheduling

r253236 broke AArch64 bootstrap. Earlier revision r253071 changed scheduling
behaviour on AArch64 as autopref scheduling no longer checks the base.

This patch fixes the bootstrap failure and cleans up autopref scheduling.
The code is greatly simplified.  Sort accesses on the offset first, and
only if the offsets are the same fall back to other comparisons in
rank_for_schedule.  This doesn't at all restore the original behaviour
since we no longer compare the base address, but it now defines a total
sorting order.  More work will be required to improve the sorting so
that only loads/stores with the same base are affected.

    gcc/
PR rtl-optimization/82396
* gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
(autopref_multipass_init): Simplify initialization.
(autopref_rank_data): Simplify sort order.
* gcc/sched-int.h (autopref_multipass_data_): Remove
multi_mem_insn_p, min_offset and max_offset.

From-SVN: r254056
gcc/ChangeLog
gcc/haifa-sched.c
gcc/sched-int.h