<div dir="ltr"><div><div><div>Hi,<br><br></div><div>I am having some trouble understanding the scheduling scheme for the C-A9.<br><br></div>Looking at the ARMScheduleA9.td file I find this line that overrides the target SchedWrite with processor specific latencies.<br><br>def : SchedAlias<WriteALU, A9WriteALU>;<br><br></div>However, in this same file, I find the lines presented below, which are mapping the SchedReadWrite to, for example, the ANDri instruction.<br><br>// ===---------------------------------------------------------------------===//<br>// Subtarget-specific overrides. Map opcodes to list of SchedReadWrite types.<br>//<br>def : InstRW< [WriteALU],<br>      (instregex "ANDri", "ORRri", "EORri", "BICri", "ANDrr", "ORRrr", "EORrr",<br>                 "BICrr")>;<br><br><br>This same instruction is defined in the ARMInstrInfo.td as inheriting from AsI1_bin_irs (shown below)  which, in turn, associates Sched<[WriteALU, ReadALU]> with the instruction.<br><br>defm AND   : AsI1_bin_irs<0b0000, "and",<br>                          IIC_iBITi, IIC_iBITr, IIC_iBITsr, and, 1>;<br><br></div><div>In my mind, we have latencies defined from the ProcessorItineraries, latencies defined in the SchedReadWrite representation which are mapped through SchedAlias to the ANDri and, in the end, a mapping (or overriding?) of the latencies in the Itineraries by the processor-specific SchedWrites, through the InstRW?<br></div><div><br></div><div>Can someone share some light on what scheduling/lantecy information is being used in this case? I cannot get my head around this... What am I missing here?<br><br></div><div>Note: I also do not understand why use instregex if we could use the IIC_* for the InstRW.<br></div><div><br></div><div>Thanks.<br><br></div><div>- Tiago<br></div><div><br></div><br></div>