Cleanup autopref scheduling

Programming / Compilers / GCC - wilco [138bc75d-0d04-0410-961f-82ee72b054a4] - 24 October 2017 13:21 EDT

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.

cbde9eb Cleanup autopref scheduling
gcc/ChangeLog | 9 +++++
gcc/haifa-sched.c | 104 ++++++++----------------------------------------------
gcc/sched-int.h | 11 ++----
3 files changed, 25 insertions(+), 99 deletions(-)


  • Share