This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, sched] Cleanup and improve multipass_dfa_lookahead_guard
- From: Jeff Law <law at redhat dot com>
- To: Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, Jim Wilson <jimwilso at cisco dot com>, "David Edelsohn (dje dot gcc at gmail dot com)" <dje dot gcc at gmail dot com>
- Date: Tue, 20 May 2014 11:37:10 -0600
- Subject: Re: [PATCH, sched] Cleanup and improve multipass_dfa_lookahead_guard
- Authentication-results: sourceware.org; auth=none
- References: <FECDDDDD-CB42-4560-B14B-27930564368C at linaro dot org>
On 05/19/14 22:27, Maxim Kuvyrkov wrote:
This patch cleans up haifa-sched.c:choose_ready() function while
allow more powerful customization by backends at the same time.
The primary change is that
targetm.sched.first_cycle_multipass_dfa_lookahead_guard hook is
converted from returning a boolean OK/Nada value to returning an
action to be applied to a given instruction in the ready list.
If return value is N == 0, then insn is OK (previous corresponding
return value was 1). If return value is N < 0, then insn should not
be considered for scheduling for -N cycles (I'm going to use this for
ARM scheduling in an upcoming patch). If return value is N > 0, then
insn can still be issued on the current cycle, just not immediately
now (previous corresponding return value was 0).
Changes to ia64 and rs6000 are mostly mechanical to update hook
return values, but port maintainers may wish to review those.
Tested on x86_64-linux-gnu, arm-linux-gnueabihf, and by building
ia64-linux-gnu cc1. Changes to PowerPC were seriously eyeballed. If
maintainers so to wish, I will carry out any additional testing.
This looks OK to me.
I think it's safe to work from the assumption that the hook will never
return INT_MIN :-)