summaryrefslogtreecommitdiff
path: root/gcc/sched-int.h
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2017-10-04 10:27:26 +0000
committerWilco Dijkstra <wilco@gcc.gnu.org>2017-10-04 10:27:26 +0000
commit3e3d1b2326f7c78279275c91b21de38c388ff8fe (patch)
tree5e3794a5b1c92bc034a62985bd7770515f6d6b46 /gcc/sched-int.h
parent26596ee50d8506ec255784646a20e8edfa0ff3b4 (diff)
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. From-SVN: r253399
Diffstat (limited to 'gcc/sched-int.h')
-rw-r--r--gcc/sched-int.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index 2af8f9fc32c..98174f7ce30 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -819,15 +819,8 @@ struct autopref_multipass_data_
/* Base part of memory address. */
rtx base;
- /* Memory offsets from the base. For single simple sets
- only min_offset is valid. For multi-set insns min_offset
- and max_offset record the minimum and maximum offsets from the same
- base among the sets inside the PARALLEL. */
- int min_offset;
- int max_offset;
-
- /* True if this is a load/store-multiple instruction. */
- bool multi_mem_insn_p;
+ /* Memory offset from the base. */
+ int offset;
/* Entry status. */
enum autopref_multipass_data_status status;