diff --git a/lib/Target/ARM/ARMSchedule.td b/lib/Target/ARM/ARMSchedule.td index 6e3b00e484c..a5ca773ef1d 100644 --- a/lib/Target/ARM/ARMSchedule.td +++ b/lib/Target/ARM/ARMSchedule.td @@ -10,11 +10,10 @@ //===----------------------------------------------------------------------===// // Functional units across ARM processors // -def FU_iALU : FuncUnit; // Integer alu unit -def FU_iLdSt : FuncUnit; // Integer load / store unit -def FU_FpALU : FuncUnit; // FP alu unit -def FU_FpLdSt : FuncUnit; // FP load / store unit -def FU_Br : FuncUnit; // Branch unit +def FU_Pipe0 : FuncUnit; // pipeline 0 issue +def FU_Pipe1 : FuncUnit; // pipeline 1 issue +def FU_LdSt0 : FuncUnit; // pipeline 0 load/store +def FU_LdSt1 : FuncUnit; // pipeline 1 load/store //===----------------------------------------------------------------------===// // Instruction Itinerary classes used for ARM @@ -30,7 +29,16 @@ def IIC_Br : InstrItinClass; //===----------------------------------------------------------------------===// // Processor instruction itineraries. -def GenericItineraries : ProcessorItineraries<[]>; +def GenericItineraries : ProcessorItineraries<[ + InstrItinData]>, + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]>, + InstrItinData]> +]>; + include "ARMScheduleV6.td" include "ARMScheduleV7.td" diff --git a/lib/Target/ARM/ARMScheduleV6.td b/lib/Target/ARM/ARMScheduleV6.td index 0cc5c36e5e6..f0b8116a038 100644 --- a/lib/Target/ARM/ARMScheduleV6.td +++ b/lib/Target/ARM/ARMScheduleV6.td @@ -11,12 +11,18 @@ // //===----------------------------------------------------------------------===// +// Single issue pipeline so every itinerary starts with FU_pipe0 def V6Itineraries : ProcessorItineraries<[ - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]> + // single-cycle integer ALU + InstrItinData]>, + // loads have an extra cycle of latency, but are fully pipelined + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + // fully-pipelined stores + InstrItinData]>, + InstrItinData]>, + // fp ALU is not pipelined + InstrItinData]>, + // no delay slots, so the latency of a branch is unimportant + InstrItinData]> ]>; diff --git a/lib/Target/ARM/ARMScheduleV7.td b/lib/Target/ARM/ARMScheduleV7.td index 328bb98fde5..30360bc9c41 100644 --- a/lib/Target/ARM/ARMScheduleV7.td +++ b/lib/Target/ARM/ARMScheduleV7.td @@ -11,23 +11,34 @@ // //===----------------------------------------------------------------------===// +// Single issue pipeline so every itinerary starts with FU_Pipe0 def V7Itineraries : ProcessorItineraries<[ - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]> + // single-cycle integer ALU + InstrItinData]>, + // loads have an extra cycle of latency, but are fully pipelined + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + // fully-pipelined stores + InstrItinData]>, + InstrItinData]>, + // fp ALU is not pipelined + InstrItinData]>, + // no delay slots, so the latency of a branch is unimportant + InstrItinData]> ]>; - +// Dual issue pipeline so every itinerary starts with FU_Pipe0 | FU_Pipe1 def CortexA8Itineraries : ProcessorItineraries<[ - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]>, - InstrItinData]> + // single-cycle integer ALU + InstrItinData]>, + // loads have an extra cycle of latency, but are fully pipelined + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + InstrItinData, InstrStage<1, [FU_LdSt0]>]>, + // fully-pipelined stores + InstrItinData]>, + InstrItinData]>, + // fp ALU is not pipelined + InstrItinData]>, + // no delay slots, so the latency of a branch is unimportant + InstrItinData]> ]>;