This is the mail archive of the gcc@gcc.gnu.org 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] | |
There already are two target hooks specifically for this purpose: targetm.sched.{reorder, reorder2}. They both have higher priority, than ready_sort ().Currently, within the ready_sort macro in haifa-sched.c, the call to qsort is passed "rank_for_schedule" to help it decide which of two instructions should be placed further towards the front of the ready list. Rank_for_schedule uses a set of ordered heuristics (rank, priority, etc.) to make this decision. The set of heuristics is fixed for all target machines.
In rank_for_schedule () only machine independent heuristics are gathered; the rest of the haifa scheduler is no less machine dependent, than these heuristics are. Machine dependent things are separated in reorder hooks (which, btw, are defined on 3 targets only).There can be cases, however, where a target machine may want to define heuristics driven by specific characteristics of that machine. Those heuristics may be meaningless on other targets.
-- Maxim
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |