15 #ifndef LLVM_LIB_TARGET_AMDGPU_R600INSTRINFO_H 16 #define LLVM_LIB_TARGET_AMDGPU_R600INSTRINFO_H 21 #define GET_INSTRINFO_HEADER 22 #include "R600GenInstrInfo.inc" 26 namespace R600InstrFlags {
45 std::vector<std::pair<int, unsigned>>
47 unsigned &ConstCount)
const;
51 unsigned ValueReg,
unsigned Address,
53 unsigned AddrChan)
const;
57 unsigned ValueReg,
unsigned Address,
59 unsigned AddrChan)
const;
62 ALU_VEC_012_SCL_210 = 0,
77 const DebugLoc &DL,
unsigned DestReg,
unsigned SrcReg,
78 bool KillSrc)
const override;
82 bool isReductionOp(
unsigned opcode)
const;
83 bool isCubeOp(
unsigned opcode)
const;
86 bool isALUInstr(
unsigned Opcode)
const;
87 bool hasInstrModifiers(
unsigned Opcode)
const;
88 bool isLDSInstr(
unsigned Opcode)
const;
89 bool isLDSRetInstr(
unsigned Opcode)
const;
95 bool isTransOnly(
unsigned Opcode)
const;
97 bool isVectorOnly(
unsigned Opcode)
const;
99 bool isExport(
unsigned Opcode)
const;
101 bool usesVertexCache(
unsigned Opcode)
const;
103 bool usesTextureCache(
unsigned Opcode)
const;
106 bool mustBeLastInClause(
unsigned Opcode)
const;
113 int getSelIdx(
unsigned Opcode,
unsigned SrcIdx)
const;
123 unsigned isLegalUpTo(
124 const std::vector<std::vector<std::pair<int, unsigned> > > &IGSrcs,
125 const std::vector<R600InstrInfo::BankSwizzle> &Swz,
126 const std::vector<std::pair<int, unsigned> > &TransSrcs,
129 bool FindSwizzleForVectorSlot(
130 const std::vector<std::vector<std::pair<int, unsigned> > > &IGSrcs,
131 std::vector<R600InstrInfo::BankSwizzle> &SwzCandidate,
132 const std::vector<std::pair<int, unsigned> > &TransSrcs,
144 bool fitsReadPortLimitations(
const std::vector<MachineInstr *> &MIs,
146 std::vector<BankSwizzle> &BS,
147 bool isLastAluTrans)
const;
152 bool fitsConstReadLimitations(
const std::vector<MachineInstr *> &)
const;
154 bool fitsConstReadLimitations(
const std::vector<unsigned>&)
const;
160 bool isMov(
unsigned Opcode)
const;
165 bool reverseBranchCondition(
171 bool AllowModify)
const override;
176 int *BytesAdded =
nullptr)
const override;
179 int *BytesRemvoed =
nullptr)
const override;
183 bool isPredicable(
const MachineInstr &MI)
const override;
189 unsigned ExtraPredCycles,
193 unsigned NumTCycles,
unsigned ExtraTCycles,
195 unsigned NumFCycles,
unsigned ExtraFCycles,
199 std::vector<MachineOperand> &Pred)
const override;
207 unsigned int getPredicationCost(
const MachineInstr &)
const override;
211 unsigned *PredCost =
nullptr)
const override;
213 bool expandPostRAPseudo(
MachineInstr &MI)
const override;
216 void reserveIndirectRegisters(
BitVector &Reserved,
227 unsigned calculateIndirectAddress(
unsigned RegIndex,
unsigned Channel)
const;
247 unsigned ValueReg,
unsigned Address,
248 unsigned OffsetReg)
const;
255 unsigned ValueReg,
unsigned Address,
256 unsigned OffsetReg)
const;
258 unsigned getMaxAlusPerClause()
const;
272 unsigned Src1Reg = 0)
const;
277 unsigned DstReg)
const;
286 unsigned DstReg,
unsigned SrcReg)
const;
296 int getOperandIdx(
unsigned Opcode,
unsigned Op)
const;
299 void setImmOperand(
MachineInstr &MI,
unsigned Op, int64_t Imm)
const;
305 bool isFlagSet(
const MachineInstr &MI,
unsigned Operand,
unsigned Flag)
const;
312 unsigned Flag = 0)
const;
315 void clearFlag(
MachineInstr &MI,
unsigned Operand,
unsigned Flag)
const;
326 unsigned getAddressSpaceForPseudoSourceKind(
327 unsigned Kind)
const override;
This class represents lattice values for constants.
unsigned const TargetRegisterInfo * TRI
Interface definition for R600RegisterInfo.
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...
bool isVector(MCInstrInfo const &MCII, MCInst const &MCI)
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.