2012-02-28 15:46:26 +08:00
|
|
|
//===-- MipsSchedule.td - Mips Scheduling Definitions ------*- tablegen -*-===//
|
2007-08-18 09:46:44 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2007-08-18 09:46:44 +08:00
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-08-18 09:46:44 +08:00
|
|
|
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-08-18 09:46:44 +08:00
|
|
|
// Functional units across Mips chips sets. Based on GCC/Mips backend files.
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-08-18 09:46:44 +08:00
|
|
|
def ALU : FuncUnit;
|
|
|
|
def IMULDIV : FuncUnit;
|
|
|
|
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2011-03-05 01:51:39 +08:00
|
|
|
// Instruction Itinerary classes used for Mips
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-08-18 09:46:44 +08:00
|
|
|
def IIAlu : InstrItinClass;
|
|
|
|
def IILoad : InstrItinClass;
|
|
|
|
def IIStore : InstrItinClass;
|
|
|
|
def IIBranch : InstrItinClass;
|
|
|
|
def IIHiLo : InstrItinClass;
|
|
|
|
def IIImul : InstrItinClass;
|
2013-07-13 06:43:20 +08:00
|
|
|
def IIImult : InstrItinClass;
|
2007-08-18 09:46:44 +08:00
|
|
|
def IIIdiv : InstrItinClass;
|
2013-07-13 06:43:20 +08:00
|
|
|
def IIslt : InstrItinClass;
|
2007-08-18 09:46:44 +08:00
|
|
|
def IIFcvt : InstrItinClass;
|
|
|
|
def IIFmove : InstrItinClass;
|
|
|
|
def IIFcmp : InstrItinClass;
|
|
|
|
def IIFadd : InstrItinClass;
|
|
|
|
def IIFmulSingle : InstrItinClass;
|
|
|
|
def IIFmulDouble : InstrItinClass;
|
|
|
|
def IIFdivSingle : InstrItinClass;
|
|
|
|
def IIFdivDouble : InstrItinClass;
|
|
|
|
def IIFsqrtSingle : InstrItinClass;
|
|
|
|
def IIFsqrtDouble : InstrItinClass;
|
|
|
|
def IIFrecipFsqrtStep : InstrItinClass;
|
2013-07-02 08:00:02 +08:00
|
|
|
def IIFLoad : InstrItinClass;
|
|
|
|
def IIFStore : InstrItinClass;
|
|
|
|
def IIFmoveC1 : InstrItinClass;
|
2007-08-18 09:46:44 +08:00
|
|
|
def IIPseudo : InstrItinClass;
|
|
|
|
|
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.
IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
II_SR[AL]V, II_SUBU, II_XOR
No functional change since the InstrItinData's have been duplicated.
This is necessary because the classes are shared between all schedulers.
Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.
llvm-svn: 199391
2014-01-16 22:27:20 +08:00
|
|
|
def II_ADDI : InstrItinClass;
|
|
|
|
def II_ADDIU : InstrItinClass;
|
|
|
|
def II_ADDU : InstrItinClass;
|
|
|
|
def II_AND : InstrItinClass;
|
2014-01-16 23:57:05 +08:00
|
|
|
def II_ANDI : InstrItinClass;
|
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.
IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
II_SR[AL]V, II_SUBU, II_XOR
No functional change since the InstrItinData's have been duplicated.
This is necessary because the classes are shared between all schedulers.
Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.
llvm-svn: 199391
2014-01-16 22:27:20 +08:00
|
|
|
def II_CLO : InstrItinClass;
|
|
|
|
def II_CLZ : InstrItinClass;
|
|
|
|
def II_DADDIU : InstrItinClass;
|
|
|
|
def II_DADDU : InstrItinClass;
|
|
|
|
def II_DROTR : InstrItinClass;
|
|
|
|
def II_DROTR32 : InstrItinClass;
|
|
|
|
def II_DROTRV : InstrItinClass;
|
|
|
|
def II_DSLL : InstrItinClass;
|
|
|
|
def II_DSLL32 : InstrItinClass;
|
|
|
|
def II_DSLLV : InstrItinClass;
|
|
|
|
def II_DSRA : InstrItinClass;
|
|
|
|
def II_DSRA32 : InstrItinClass;
|
|
|
|
def II_DSRAV : InstrItinClass;
|
|
|
|
def II_DSRL : InstrItinClass;
|
|
|
|
def II_DSRL32 : InstrItinClass;
|
|
|
|
def II_DSRLV : InstrItinClass;
|
|
|
|
def II_DSUBU : InstrItinClass;
|
|
|
|
def II_LUI : InstrItinClass;
|
|
|
|
def II_MOVF : InstrItinClass;
|
|
|
|
def II_MOVN : InstrItinClass;
|
|
|
|
def II_MOVT : InstrItinClass;
|
|
|
|
def II_MOVZ : InstrItinClass;
|
|
|
|
def II_NOR : InstrItinClass;
|
|
|
|
def II_OR : InstrItinClass;
|
|
|
|
def II_ORI : InstrItinClass;
|
|
|
|
def II_RDHWR : InstrItinClass;
|
|
|
|
def II_ROTR : InstrItinClass;
|
|
|
|
def II_ROTRV : InstrItinClass;
|
2014-01-17 00:19:38 +08:00
|
|
|
def II_SEB : InstrItinClass;
|
|
|
|
def II_SEH : InstrItinClass;
|
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.
IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
II_SR[AL]V, II_SUBU, II_XOR
No functional change since the InstrItinData's have been duplicated.
This is necessary because the classes are shared between all schedulers.
Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.
llvm-svn: 199391
2014-01-16 22:27:20 +08:00
|
|
|
def II_SLL : InstrItinClass;
|
|
|
|
def II_SLLV : InstrItinClass;
|
|
|
|
def II_SRA : InstrItinClass;
|
|
|
|
def II_SRAV : InstrItinClass;
|
|
|
|
def II_SRL : InstrItinClass;
|
|
|
|
def II_SRLV : InstrItinClass;
|
|
|
|
def II_SUBU : InstrItinClass;
|
|
|
|
def II_XOR : InstrItinClass;
|
2014-01-16 23:57:05 +08:00
|
|
|
def II_XORI : InstrItinClass;
|
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.
IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
II_SR[AL]V, II_SUBU, II_XOR
No functional change since the InstrItinData's have been duplicated.
This is necessary because the classes are shared between all schedulers.
Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.
llvm-svn: 199391
2014-01-16 22:27:20 +08:00
|
|
|
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-08-18 09:46:44 +08:00
|
|
|
// Mips Generic instruction itineraries.
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-09-29 07:50:49 +08:00
|
|
|
def MipsGenericItineraries : ProcessorItineraries<[ALU, IMULDIV], [], [
|
2007-08-18 09:46:44 +08:00
|
|
|
InstrItinData<IIAlu , [InstrStage<1, [ALU]>]>,
|
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.
IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
II_SR[AL]V, II_SUBU, II_XOR
No functional change since the InstrItinData's have been duplicated.
This is necessary because the classes are shared between all schedulers.
Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.
llvm-svn: 199391
2014-01-16 22:27:20 +08:00
|
|
|
InstrItinData<II_ADDI , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_ADDIU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_ADDU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_AND , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SLL , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SRA , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SRL , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_ROTR , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SLLV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SRAV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SRLV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_ROTRV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_CLO , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_CLZ , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DADDIU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DADDU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSLL , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSRL , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSRA , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSLLV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSRLV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSRAV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DSUBU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DROTR , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_DROTRV , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_LUI , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_MOVF , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_MOVN , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_MOVT , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_MOVZ , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_NOR , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_OR , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_RDHWR , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_SUBU , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_XOR , [InstrStage<1, [ALU]>]>,
|
2014-01-16 23:57:05 +08:00
|
|
|
InstrItinData<II_ANDI , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_ORI , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<II_XORI , [InstrStage<1, [ALU]>]>,
|
2007-08-18 09:46:44 +08:00
|
|
|
InstrItinData<IILoad , [InstrStage<3, [ALU]>]>,
|
|
|
|
InstrItinData<IIStore , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<IIBranch , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<IIHiLo , [InstrStage<1, [IMULDIV]>]>,
|
|
|
|
InstrItinData<IIImul , [InstrStage<17, [IMULDIV]>]>,
|
[mips] IIImult should have an InstrItinData in the generic scheduler. Used the same one as for IIImul.
Affects:
DMULT, DMULTu, MADD, MADD_MM, MADDU, MADDU_MM, MSUB, MSUB_MM, MSUBU,
MSUBU_MM, MULT, MULTu
Does not affect MULT_MM, MULTu_MM since they are currently miscategorised
as IIImul.
llvm-svn: 199381
2014-01-16 21:45:53 +08:00
|
|
|
InstrItinData<IIImult , [InstrStage<17, [IMULDIV]>]>,
|
2007-08-18 09:46:44 +08:00
|
|
|
InstrItinData<IIIdiv , [InstrStage<38, [IMULDIV]>]>,
|
|
|
|
InstrItinData<IIFcvt , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<IIFmove , [InstrStage<2, [ALU]>]>,
|
|
|
|
InstrItinData<IIFcmp , [InstrStage<3, [ALU]>]>,
|
|
|
|
InstrItinData<IIFadd , [InstrStage<4, [ALU]>]>,
|
|
|
|
InstrItinData<IIFmulSingle , [InstrStage<7, [ALU]>]>,
|
|
|
|
InstrItinData<IIFmulDouble , [InstrStage<8, [ALU]>]>,
|
|
|
|
InstrItinData<IIFdivSingle , [InstrStage<23, [ALU]>]>,
|
|
|
|
InstrItinData<IIFdivDouble , [InstrStage<36, [ALU]>]>,
|
|
|
|
InstrItinData<IIFsqrtSingle , [InstrStage<54, [ALU]>]>,
|
|
|
|
InstrItinData<IIFsqrtDouble , [InstrStage<12, [ALU]>]>,
|
2013-07-02 08:00:02 +08:00
|
|
|
InstrItinData<IIFrecipFsqrtStep , [InstrStage<5, [ALU]>]>,
|
|
|
|
InstrItinData<IIFLoad , [InstrStage<3, [ALU]>]>,
|
|
|
|
InstrItinData<IIFStore , [InstrStage<1, [ALU]>]>,
|
|
|
|
InstrItinData<IIFmoveC1 , [InstrStage<2, [ALU]>]>
|
2007-08-18 09:46:44 +08:00
|
|
|
]>;
|