This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR65161]
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Yuri Rumyantsev <ysrumyan at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>, Igor Zamyatin <izamyatin at gmail dot com>, Andrey Belevantsev <abel at ispras dot ru>
- Date: Tue, 24 Feb 2015 21:16:26 +0300 (MSK)
- Subject: Re: [PATCH PR65161]
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqRfEsfmyaG5NKmrq6bdPEK6Mi72bJu1dTQpFnhHwOD+Xw at mail dot gmail dot com>
On Tue, 24 Feb 2015, Yuri Rumyantsev wrote:
> Hi All!
>
> Here is a simple patch to not perform instruction reordering for
> selective scheduling since it uses interface of list scheduling
> defined in "sched-int.h".
As I see, the exact problem is that swap_top_of_ready_list accesses HID, so
please use the more specialized patch below instead.
Thanks.
Alexander
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7f5796a..6eccd54 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -26615,6 +26615,12 @@ swap_top_of_ready_list (rtx_insn **ready, int n_ready)
dep_t dep;
int clock1 = -1;
int clock2 = -1;
+
+ /* The following heuristic inspects h_i_d, but it is not extended for insns
+ created when doing selective scheduling. */
+ if (sel_sched_p())
+ return false;
+
#define INSN_TICK(INSN) (HID (INSN)->tick)
if (!TARGET_SILVERMONT && !TARGET_INTEL)