<div dir="ltr"><div><div>I need to add instruction scheduling for a new target which is a fairly simple in-order execution machine.<br><br>I've been watching this presentation from a 2014 LLVM dev meeting as it seems relevant:<br></div>"SchedMachineModel: Adding and Optimizing a Subtarget" <a href="http://llvm.org/devmtg/2014-10/Slides/Estes-MISchedulerTutorial.pdf">http://llvm.org/devmtg/2014-10/Slides/Estes-MISchedulerTutorial.pdf</a><br><br></div>In this presentation the author says that there have been several ways to approach scheduling in LLVM over the years:<br><br><ul><li><font size="2">Pre 2008: SelectionDAGISel pass creates the ScheduleDAG from the SelectionDAG at the end of instruction selection</font></li><li><font size="2">ScheduleDAG works on SelectionDAG Nodes (SDNodes)</font></li><li><font size="2">Circa 2008: Post Register </font><div style="font-family:sans-serif"><font size="2">Allocation pass added for </font></div><div style="font-family:sans-serif"><font size="2">instruction selection (</font><font size="2"> SchedulePostRATDList </font><div style="font-family:sans-serif"><font size="2">works on MachineInstrs)</font></div></div></li><li><font size="2">Circa 2012: MIScheduler </font><div style="font-family:sans-serif"><font size="2">(ScheduleDAGMI) added as </font></div><div style="font-family:sans-serif"><font size="2">separate pass for pre-RA </font></div><div style="font-family:sans-serif"><font size="2">scheduling</font></div></li><li><font size="2">Circa 2014: MIScheduler </font><div style="font-family:sans-serif"><font size="2">adapted to optionally replace </font></div><div style="font-family:sans-serif"><font size="2">PostRA Scheduler</font></div></li></ul><p><font size="2">In the presentation he goes with defining a subclass of SchedMachineModel</font> in the schedule .td file. And apparently with this approach there are no instruction itineraries.</p><p>So I'm wondering: what's the current recommended way to approach this and does it depend on the type or target? (in-order, superscalar, out of order, VLIW...)?</p><p>Someone earlier started to define instruction itineraries for our target. Should I continue down this road or move over to the SchedMachineModel approach? Are there other recommended presentations/documents that I should be looking at?</p><p><br></p><p>Thanks.</p><p>Phil<br></p></div>