14 #ifndef LLVM_LIB_TARGET_AMDGPU_R600INSTRINFO_H 15 #define LLVM_LIB_TARGET_AMDGPU_R600INSTRINFO_H 20 #define GET_INSTRINFO_HEADER 21 #include "R600GenInstrInfo.inc" 25 namespace R600InstrFlags {
44 std::vector<std::pair<int, unsigned>>
46 unsigned &ConstCount)
const;
50 unsigned ValueReg,
unsigned Address,
52 unsigned AddrChan)
const;
56 unsigned ValueReg,
unsigned Address,
58 unsigned AddrChan)
const;
61 ALU_VEC_012_SCL_210 = 0,
77 bool KillSrc)
const override;
81 bool isReductionOp(
unsigned opcode)
const;
82 bool isCubeOp(
unsigned opcode)
const;
85 bool isALUInstr(
unsigned Opcode)
const;
86 bool hasInstrModifiers(
unsigned Opcode)
const;
87 bool isLDSInstr(
unsigned Opcode)
const;
88 bool isLDSRetInstr(
unsigned Opcode)
const;
94 bool isTransOnly(
unsigned Opcode)
const;
96 bool isVectorOnly(
unsigned Opcode)
const;
98 bool isExport(
unsigned Opcode)
const;
100 bool usesVertexCache(
unsigned Opcode)
const;
102 bool usesTextureCache(
unsigned Opcode)
const;
105 bool mustBeLastInClause(
unsigned Opcode)
const;
112 int getSelIdx(
unsigned Opcode,
unsigned SrcIdx)
const;
122 unsigned isLegalUpTo(
123 const std::vector<std::vector<std::pair<int, unsigned> > > &IGSrcs,
124 const std::vector<R600InstrInfo::BankSwizzle> &Swz,
125 const std::vector<std::pair<int, unsigned> > &TransSrcs,
128 bool FindSwizzleForVectorSlot(
129 const std::vector<std::vector<std::pair<int, unsigned> > > &IGSrcs,
130 std::vector<R600InstrInfo::BankSwizzle> &SwzCandidate,
131 const std::vector<std::pair<int, unsigned> > &TransSrcs,
143 bool fitsReadPortLimitations(
const std::vector<MachineInstr *> &MIs,
145 std::vector<BankSwizzle> &BS,
146 bool isLastAluTrans)
const;
151 bool fitsConstReadLimitations(
const std::vector<MachineInstr *> &)
const;
153 bool fitsConstReadLimitations(
const std::vector<unsigned>&)
const;
159 bool isMov(
unsigned Opcode)
const;
164 bool reverseBranchCondition(
170 bool AllowModify)
const override;
175 int *BytesAdded =
nullptr)
const override;
178 int *BytesRemvoed =
nullptr)
const override;
182 bool isPredicable(
const MachineInstr &MI)
const override;
188 unsigned ExtraPredCycles,
192 unsigned NumTCycles,
unsigned ExtraTCycles,
194 unsigned NumFCycles,
unsigned ExtraFCycles,
198 std::vector<MachineOperand> &Pred)
const override;
206 unsigned int getPredicationCost(
const MachineInstr &)
const override;
210 unsigned *PredCost =
nullptr)
const override;
212 bool expandPostRAPseudo(
MachineInstr &MI)
const override;
215 void reserveIndirectRegisters(
BitVector &Reserved,
226 unsigned calculateIndirectAddress(
unsigned RegIndex,
unsigned Channel)
const;
246 unsigned ValueReg,
unsigned Address,
247 unsigned OffsetReg)
const;
254 unsigned ValueReg,
unsigned Address,
255 unsigned OffsetReg)
const;
257 unsigned getMaxAlusPerClause()
const;
271 unsigned Src1Reg = 0)
const;
276 unsigned DstReg)
const;
285 unsigned DstReg,
unsigned SrcReg)
const;
295 int getOperandIdx(
unsigned Opcode,
unsigned Op)
const;
298 void setImmOperand(
MachineInstr &MI,
unsigned Op, int64_t Imm)
const;
304 bool isFlagSet(
const MachineInstr &MI,
unsigned Operand,
unsigned Flag)
const;
311 unsigned Flag = 0)
const;
314 void clearFlag(
MachineInstr &MI,
unsigned Operand,
unsigned Flag)
const;
325 unsigned getAddressSpaceForPseudoSourceKind(
326 unsigned Kind)
const override;
Wrapper class representing physical registers. Should be passed by value.
This class represents lattice values for constants.
unsigned const TargetRegisterInfo * TRI
Interface definition for R600RegisterInfo.
LegalityPredicate isVector(unsigned TypeIdx)
True iff the specified type index is a vector.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
bool isRegisterLoad(const MachineInstr &MI) const
bool isRegisterStore(const MachineInstr &MI) const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Itinerary data supplied by a subtarget to be used by a target.
Flag
These should be considered private to the implementation of the MCInstrDesc class.
const R600RegisterInfo & getRegisterInfo() const
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
int getLDSNoRetOp(uint16_t Opcode)
bool isPredicated(MCInstrInfo const &MCII, MCInst const &MCI)
TargetSubtargetInfo - Generic base class for all target subtargets.
Representation of each machine instruction.