I got some beginner’s questions around the topic of Instruction Scheduling. To give some background info: the planned project is to implement a data-driven instruction scheduler, i.e. using machine learning for solving the scheduling problem for new processors in order to reduce the development task for new targets. So the scheduler should learn on its own what makes good scheduling. It should only be given basic hardware information that is required, e.g. register information.
Some questions came up while learning about how scheduling in LLVM works. Please correct me if there is anything wrong with my statements.
- I learned that there are two ways of Instruction Scheduling in LLVM. The legacy scheduler
ScheduleDAGRRListand the newer
MachineScheduler. In this talk, they also said, it was target-dependent which one is used.
So if I want to implement one, is it important on which one it will be based?
Any recommendations on which one I should choose as a basis if I have a choice?
- I wasn’t able to understand the differences between the two schedulers and why the new one might be better? Does the new one also work on DAGs? Could you give a brief explanation?
- Are heuristics (like register pressure, variable liveness) tracked automatically? And how can I access them in code?
- Do you have any recommendations on how to benchmark the schedules most accurately?
If there’s a better place to ask these questions, please let me know.