This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, sched] Cleanup and improve multipass_dfa_lookahead_guard


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.

OK to apply?

Thank you,

Maxim Kuvyrkov

Attachment: 0004-Cleanup-and-improve-multipass_dfa_lookahead_guard.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]