This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/82396] [8 Regression] qsort comparator non-negative on sorted output: 4 in ready_sort_real in haifa scheduler
- From: "wilco at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Oct 2017 10:27:57 +0000
- Subject: [Bug rtl-optimization/82396] [8 Regression] qsort comparator non-negative on sorted output: 4 in ready_sort_real in haifa scheduler
- Auto-submitted: auto-generated
- References: <bug-82396-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82396
--- Comment #7 from Wilco <wilco at gcc dot gnu.org> ---
Author: wilco
Date: Wed Oct 4 10:27:26 2017
New Revision: 253399
URL: https://gcc.gnu.org/viewcvs?rev=253399&root=gcc&view=rev
Log:
Fix PR82396: qsort comparator non-negative on sorted output
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
* haifa-sched.c (autopref_multipass_init): Simplify
initialization.
(autopref_rank_data): Simplify sort order.
* sched-int.h (autopref_multipass_data_): Remove
multi_mem_insn_p, min_offset and max_offset.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/haifa-sched.c
trunk/gcc/sched-int.h