#ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
#define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPUBASEINFO_H
#include "AMDGPUSubtarget.h"
#include "SIDefines.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Alignment.h"
#include <array>
#include <functional>
#include <utility>
struct amd_kernel_code_t;
namespace llvm {
struct Align;
class Argument;
class Function;
class GlobalValue;
class MCInstrInfo;
class MCRegisterClass;
class MCRegisterInfo;
class MCSubtargetInfo;
class StringRef;
class Triple;
class raw_ostream;
namespace AMDGPU {
struct AMDGPUMCKernelCodeT;
struct IsaVersion;
namespace GenericVersion {
static constexpr unsigned GFX9 = …;
static constexpr unsigned GFX10_1 = …;
static constexpr unsigned GFX10_3 = …;
static constexpr unsigned GFX11 = …;
static constexpr unsigned GFX12 = …;
}
enum { … };
bool isHsaAbi(const MCSubtargetInfo &STI);
unsigned getAMDHSACodeObjectVersion(const Module &M);
unsigned getAMDHSACodeObjectVersion(unsigned ABIVersion);
unsigned getDefaultAMDHSACodeObjectVersion();
uint8_t getELFABIVersion(const Triple &OS, unsigned CodeObjectVersion);
unsigned getMultigridSyncArgImplicitArgPosition(unsigned COV);
unsigned getHostcallImplicitArgPosition(unsigned COV);
unsigned getDefaultQueueImplicitArgPosition(unsigned COV);
unsigned getCompletionActionImplicitArgPosition(unsigned COV);
struct GcnBufferFormatInfo { … };
struct MAIInstInfo { … };
#define GET_MIMGBaseOpcode_DECL
#define GET_MIMGDim_DECL
#define GET_MIMGEncoding_DECL
#define GET_MIMGLZMapping_DECL
#define GET_MIMGMIPMapping_DECL
#define GET_MIMGBiASMapping_DECL
#define GET_MAIInstInfoTable_DECL
#include "AMDGPUGenSearchableTables.inc"
namespace IsaInfo {
enum { … };
enum class TargetIDSetting { … };
class AMDGPUTargetID { … };
unsigned getWavefrontSize(const MCSubtargetInfo *STI);
unsigned getLocalMemorySize(const MCSubtargetInfo *STI);
unsigned getAddressableLocalMemorySize(const MCSubtargetInfo *STI);
unsigned getEUsPerCU(const MCSubtargetInfo *STI);
unsigned getMaxWorkGroupsPerCU(const MCSubtargetInfo *STI,
unsigned FlatWorkGroupSize);
unsigned getMinWavesPerEU(const MCSubtargetInfo *STI);
unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI);
unsigned getWavesPerEUForWorkGroup(const MCSubtargetInfo *STI,
unsigned FlatWorkGroupSize);
unsigned getMinFlatWorkGroupSize(const MCSubtargetInfo *STI);
unsigned getMaxFlatWorkGroupSize(const MCSubtargetInfo *STI);
unsigned getWavesPerWorkGroup(const MCSubtargetInfo *STI,
unsigned FlatWorkGroupSize);
unsigned getSGPRAllocGranule(const MCSubtargetInfo *STI);
unsigned getSGPREncodingGranule(const MCSubtargetInfo *STI);
unsigned getTotalNumSGPRs(const MCSubtargetInfo *STI);
unsigned getAddressableNumSGPRs(const MCSubtargetInfo *STI);
unsigned getMinNumSGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU);
unsigned getMaxNumSGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU,
bool Addressable);
unsigned getNumExtraSGPRs(const MCSubtargetInfo *STI, bool VCCUsed,
bool FlatScrUsed, bool XNACKUsed);
unsigned getNumExtraSGPRs(const MCSubtargetInfo *STI, bool VCCUsed,
bool FlatScrUsed);
unsigned getNumSGPRBlocks(const MCSubtargetInfo *STI, unsigned NumSGPRs);
unsigned
getVGPRAllocGranule(const MCSubtargetInfo *STI,
std::optional<bool> EnableWavefrontSize32 = std::nullopt);
unsigned getVGPREncodingGranule(
const MCSubtargetInfo *STI,
std::optional<bool> EnableWavefrontSize32 = std::nullopt);
unsigned getTotalNumVGPRs(const MCSubtargetInfo *STI);
unsigned getAddressableNumArchVGPRs(const MCSubtargetInfo *STI);
unsigned getAddressableNumVGPRs(const MCSubtargetInfo *STI);
unsigned getMinNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU);
unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU);
unsigned getNumWavesPerEUWithNumVGPRs(const MCSubtargetInfo *STI,
unsigned NumVGPRs);
unsigned getNumWavesPerEUWithNumVGPRs(unsigned NumVGPRs, unsigned Granule,
unsigned MaxWaves,
unsigned TotalNumVGPRs);
unsigned getOccupancyWithNumSGPRs(unsigned SGPRs, unsigned MaxWaves,
AMDGPUSubtarget::Generation Gen);
unsigned getEncodedNumVGPRBlocks(
const MCSubtargetInfo *STI, unsigned NumVGPRs,
std::optional<bool> EnableWavefrontSize32 = std::nullopt);
unsigned getAllocatedNumVGPRBlocks(
const MCSubtargetInfo *STI, unsigned NumVGPRs,
std::optional<bool> EnableWavefrontSize32 = std::nullopt);
}
template <unsigned HighBit, unsigned LowBit, unsigned D = 0>
struct EncodingField { … };
EncodingBit;
template <typename... Fields> struct EncodingFields { … };
LLVM_READONLY
int16_t getNamedOperandIdx(uint16_t Opcode, uint16_t NamedIdx);
LLVM_READONLY
inline bool hasNamedOperand(uint64_t Opcode, uint64_t NamedIdx) { … }
LLVM_READONLY
int getSOPPWithRelaxation(uint16_t Opcode);
struct MIMGBaseOpcodeInfo { … };
LLVM_READONLY
const MIMGBaseOpcodeInfo *getMIMGBaseOpcode(unsigned Opc);
LLVM_READONLY
const MIMGBaseOpcodeInfo *getMIMGBaseOpcodeInfo(unsigned BaseOpcode);
struct MIMGDimInfo { … };
LLVM_READONLY
const MIMGDimInfo *getMIMGDimInfo(unsigned DimEnum);
LLVM_READONLY
const MIMGDimInfo *getMIMGDimInfoByEncoding(uint8_t DimEnc);
LLVM_READONLY
const MIMGDimInfo *getMIMGDimInfoByAsmSuffix(StringRef AsmSuffix);
struct MIMGLZMappingInfo { … };
struct MIMGMIPMappingInfo { … };
struct MIMGBiasMappingInfo { … };
struct MIMGOffsetMappingInfo { … };
struct MIMGG16MappingInfo { … };
LLVM_READONLY
const MIMGLZMappingInfo *getMIMGLZMappingInfo(unsigned L);
struct WMMAOpcodeMappingInfo { … };
LLVM_READONLY
const MIMGMIPMappingInfo *getMIMGMIPMappingInfo(unsigned MIP);
LLVM_READONLY
const MIMGBiasMappingInfo *getMIMGBiasMappingInfo(unsigned Bias);
LLVM_READONLY
const MIMGOffsetMappingInfo *getMIMGOffsetMappingInfo(unsigned Offset);
LLVM_READONLY
const MIMGG16MappingInfo *getMIMGG16MappingInfo(unsigned G);
LLVM_READONLY
int getMIMGOpcode(unsigned BaseOpcode, unsigned MIMGEncoding,
unsigned VDataDwords, unsigned VAddrDwords);
LLVM_READONLY
int getMaskedMIMGOp(unsigned Opc, unsigned NewChannels);
LLVM_READONLY
unsigned getAddrSizeMIMGOp(const MIMGBaseOpcodeInfo *BaseOpcode,
const MIMGDimInfo *Dim, bool IsA16,
bool IsG16Supported);
struct MIMGInfo { … };
LLVM_READONLY
const MIMGInfo *getMIMGInfo(unsigned Opc);
LLVM_READONLY
int getMTBUFBaseOpcode(unsigned Opc);
LLVM_READONLY
int getMTBUFOpcode(unsigned BaseOpc, unsigned Elements);
LLVM_READONLY
int getMTBUFElements(unsigned Opc);
LLVM_READONLY
bool getMTBUFHasVAddr(unsigned Opc);
LLVM_READONLY
bool getMTBUFHasSrsrc(unsigned Opc);
LLVM_READONLY
bool getMTBUFHasSoffset(unsigned Opc);
LLVM_READONLY
int getMUBUFBaseOpcode(unsigned Opc);
LLVM_READONLY
int getMUBUFOpcode(unsigned BaseOpc, unsigned Elements);
LLVM_READONLY
int getMUBUFElements(unsigned Opc);
LLVM_READONLY
bool getMUBUFHasVAddr(unsigned Opc);
LLVM_READONLY
bool getMUBUFHasSrsrc(unsigned Opc);
LLVM_READONLY
bool getMUBUFHasSoffset(unsigned Opc);
LLVM_READONLY
bool getMUBUFIsBufferInv(unsigned Opc);
LLVM_READONLY
bool getMUBUFTfe(unsigned Opc);
LLVM_READONLY
bool getSMEMIsBuffer(unsigned Opc);
LLVM_READONLY
bool getVOP1IsSingle(unsigned Opc);
LLVM_READONLY
bool getVOP2IsSingle(unsigned Opc);
LLVM_READONLY
bool getVOP3IsSingle(unsigned Opc);
LLVM_READONLY
bool isVOPC64DPP(unsigned Opc);
LLVM_READONLY
bool isVOPCAsmOnly(unsigned Opc);
LLVM_READONLY
bool getMAIIsDGEMM(unsigned Opc);
LLVM_READONLY
bool getMAIIsGFX940XDL(unsigned Opc);
struct CanBeVOPD { … };
LLVM_READONLY
unsigned getVOPDEncodingFamily(const MCSubtargetInfo &ST);
LLVM_READONLY
CanBeVOPD getCanBeVOPD(unsigned Opc);
LLVM_READONLY
const GcnBufferFormatInfo *getGcnBufferFormatInfo(uint8_t BitsPerComp,
uint8_t NumComponents,
uint8_t NumFormat,
const MCSubtargetInfo &STI);
LLVM_READONLY
const GcnBufferFormatInfo *getGcnBufferFormatInfo(uint8_t Format,
const MCSubtargetInfo &STI);
LLVM_READONLY
int getMCOpcode(uint16_t Opcode, unsigned Gen);
LLVM_READONLY
unsigned getVOPDOpcode(unsigned Opc);
LLVM_READONLY
int getVOPDFull(unsigned OpX, unsigned OpY, unsigned EncodingFamily);
LLVM_READONLY
bool isVOPD(unsigned Opc);
LLVM_READNONE
bool isMAC(unsigned Opc);
LLVM_READNONE
bool isPermlane16(unsigned Opc);
LLVM_READNONE
bool isGenericAtomic(unsigned Opc);
LLVM_READNONE
bool isCvt_F32_Fp8_Bf8_e64(unsigned Opc);
namespace VOPD {
enum Component : unsigned { … };
constexpr unsigned VOPD_VGPR_BANK_MASKS[] = …;
enum ComponentIndex : unsigned { … };
constexpr unsigned COMPONENTS[] = …;
constexpr unsigned COMPONENTS_NUM = …;
class ComponentProps { … };
enum ComponentKind : unsigned { … };
class ComponentLayout { … };
class ComponentInfo : public ComponentLayout, public ComponentProps { … };
class InstInfo { … };
}
LLVM_READONLY
std::pair<unsigned, unsigned> getVOPDComponents(unsigned VOPDOpcode);
LLVM_READONLY
VOPD::InstInfo getVOPDInstInfo(const MCInstrDesc &OpX, const MCInstrDesc &OpY);
LLVM_READONLY
VOPD::InstInfo
getVOPDInstInfo(unsigned VOPDOpcode, const MCInstrInfo *InstrInfo);
LLVM_READONLY
bool isTrue16Inst(unsigned Opc);
LLVM_READONLY
bool isFP8DstSelInst(unsigned Opc);
LLVM_READONLY
bool isInvalidSingleUseConsumerInst(unsigned Opc);
LLVM_READONLY
bool isInvalidSingleUseProducerInst(unsigned Opc);
bool isDPMACCInstruction(unsigned Opc);
LLVM_READONLY
unsigned mapWMMA2AddrTo3AddrOpcode(unsigned Opc);
LLVM_READONLY
unsigned mapWMMA3AddrTo2AddrOpcode(unsigned Opc);
void initDefaultAMDKernelCodeT(AMDGPUMCKernelCodeT &Header,
const MCSubtargetInfo *STI);
bool isGroupSegment(const GlobalValue *GV);
bool isGlobalSegment(const GlobalValue *GV);
bool isReadOnlySegment(const GlobalValue *GV);
bool shouldEmitConstantsToTextSection(const Triple &TT);
int getIntegerAttribute(const Function &F, StringRef Name, int Default);
std::pair<unsigned, unsigned>
getIntegerPairAttribute(const Function &F, StringRef Name,
std::pair<unsigned, unsigned> Default,
bool OnlyFirstRequired = false);
SmallVector<unsigned> getIntegerVecAttribute(const Function &F, StringRef Name,
unsigned Size);
struct Waitcnt { … };
unsigned getVmcntBitMask(const IsaVersion &Version);
unsigned getExpcntBitMask(const IsaVersion &Version);
unsigned getLgkmcntBitMask(const IsaVersion &Version);
unsigned getWaitcntBitMask(const IsaVersion &Version);
unsigned decodeVmcnt(const IsaVersion &Version, unsigned Waitcnt);
unsigned decodeExpcnt(const IsaVersion &Version, unsigned Waitcnt);
unsigned decodeLgkmcnt(const IsaVersion &Version, unsigned Waitcnt);
void decodeWaitcnt(const IsaVersion &Version, unsigned Waitcnt,
unsigned &Vmcnt, unsigned &Expcnt, unsigned &Lgkmcnt);
Waitcnt decodeWaitcnt(const IsaVersion &Version, unsigned Encoded);
unsigned encodeVmcnt(const IsaVersion &Version, unsigned Waitcnt,
unsigned Vmcnt);
unsigned encodeExpcnt(const IsaVersion &Version, unsigned Waitcnt,
unsigned Expcnt);
unsigned encodeLgkmcnt(const IsaVersion &Version, unsigned Waitcnt,
unsigned Lgkmcnt);
unsigned encodeWaitcnt(const IsaVersion &Version,
unsigned Vmcnt, unsigned Expcnt, unsigned Lgkmcnt);
unsigned encodeWaitcnt(const IsaVersion &Version, const Waitcnt &Decoded);
unsigned getLoadcntBitMask(const IsaVersion &Version);
unsigned getSamplecntBitMask(const IsaVersion &Version);
unsigned getBvhcntBitMask(const IsaVersion &Version);
unsigned getDscntBitMask(const IsaVersion &Version);
unsigned getKmcntBitMask(const IsaVersion &Version);
unsigned getStorecntBitMask(const IsaVersion &Version);
Waitcnt decodeLoadcntDscnt(const IsaVersion &Version, unsigned LoadcntDscnt);
Waitcnt decodeStorecntDscnt(const IsaVersion &Version, unsigned StorecntDscnt);
unsigned encodeLoadcntDscnt(const IsaVersion &Version, const Waitcnt &Decoded);
unsigned encodeStorecntDscnt(const IsaVersion &Version, const Waitcnt &Decoded);
namespace Hwreg {
HwregId;
HwregOffset;
struct HwregSize : EncodingField<15, 11, 32> { … };
HwregEncoding;
}
namespace DepCtr {
int getDefaultDepCtrEncoding(const MCSubtargetInfo &STI);
int encodeDepCtr(const StringRef Name, int64_t Val, unsigned &UsedOprMask,
const MCSubtargetInfo &STI);
bool isSymbolicDepCtrEncoding(unsigned Code, bool &HasNonDefaultVal,
const MCSubtargetInfo &STI);
bool decodeDepCtr(unsigned Code, int &Id, StringRef &Name, unsigned &Val,
bool &IsDefault, const MCSubtargetInfo &STI);
unsigned decodeFieldVaVdst(unsigned Encoded);
unsigned decodeFieldVmVsrc(unsigned Encoded);
unsigned decodeFieldSaSdst(unsigned Encoded);
unsigned encodeFieldVmVsrc(unsigned VmVsrc);
unsigned encodeFieldVmVsrc(unsigned Encoded, unsigned VmVsrc);
unsigned encodeFieldVaVdst(unsigned VaVdst);
unsigned encodeFieldVaVdst(unsigned Encoded, unsigned VaVdst);
unsigned encodeFieldSaSdst(unsigned SaSdst);
unsigned encodeFieldSaSdst(unsigned Encoded, unsigned SaSdst);
}
namespace Exp {
bool getTgtName(unsigned Id, StringRef &Name, int &Index);
LLVM_READONLY
unsigned getTgtId(const StringRef Name);
LLVM_READNONE
bool isSupportedTgtId(unsigned Id, const MCSubtargetInfo &STI);
}
namespace MTBUFFormat {
LLVM_READNONE
int64_t encodeDfmtNfmt(unsigned Dfmt, unsigned Nfmt);
void decodeDfmtNfmt(unsigned Format, unsigned &Dfmt, unsigned &Nfmt);
int64_t getDfmt(const StringRef Name);
StringRef getDfmtName(unsigned Id);
int64_t getNfmt(const StringRef Name, const MCSubtargetInfo &STI);
StringRef getNfmtName(unsigned Id, const MCSubtargetInfo &STI);
bool isValidDfmtNfmt(unsigned Val, const MCSubtargetInfo &STI);
bool isValidNfmt(unsigned Val, const MCSubtargetInfo &STI);
int64_t getUnifiedFormat(const StringRef Name, const MCSubtargetInfo &STI);
StringRef getUnifiedFormatName(unsigned Id, const MCSubtargetInfo &STI);
bool isValidUnifiedFormat(unsigned Val, const MCSubtargetInfo &STI);
int64_t convertDfmtNfmt2Ufmt(unsigned Dfmt, unsigned Nfmt,
const MCSubtargetInfo &STI);
bool isValidFormatEncoding(unsigned Val, const MCSubtargetInfo &STI);
unsigned getDefaultFormatEncoding(const MCSubtargetInfo &STI);
}
namespace SendMsg {
LLVM_READNONE
bool isValidMsgId(int64_t MsgId, const MCSubtargetInfo &STI);
LLVM_READNONE
bool isValidMsgOp(int64_t MsgId, int64_t OpId, const MCSubtargetInfo &STI,
bool Strict = true);
LLVM_READNONE
bool isValidMsgStream(int64_t MsgId, int64_t OpId, int64_t StreamId,
const MCSubtargetInfo &STI, bool Strict = true);
LLVM_READNONE
bool msgRequiresOp(int64_t MsgId, const MCSubtargetInfo &STI);
LLVM_READNONE
bool msgSupportsStream(int64_t MsgId, int64_t OpId, const MCSubtargetInfo &STI);
void decodeMsg(unsigned Val, uint16_t &MsgId, uint16_t &OpId,
uint16_t &StreamId, const MCSubtargetInfo &STI);
LLVM_READNONE
uint64_t encodeMsg(uint64_t MsgId,
uint64_t OpId,
uint64_t StreamId);
}
unsigned getInitialPSInputAddr(const Function &F);
bool getHasColorExport(const Function &F);
bool getHasDepthExport(const Function &F);
LLVM_READNONE
bool isShader(CallingConv::ID CC);
LLVM_READNONE
bool isGraphics(CallingConv::ID CC);
LLVM_READNONE
bool isCompute(CallingConv::ID CC);
LLVM_READNONE
bool isEntryFunctionCC(CallingConv::ID CC);
LLVM_READNONE
bool isModuleEntryFunctionCC(CallingConv::ID CC);
LLVM_READNONE
bool isChainCC(CallingConv::ID CC);
bool isKernelCC(const Function *Func);
LLVM_READNONE
inline bool isKernel(CallingConv::ID CC) { … }
bool hasXNACK(const MCSubtargetInfo &STI);
bool hasSRAMECC(const MCSubtargetInfo &STI);
bool hasMIMG_R128(const MCSubtargetInfo &STI);
bool hasA16(const MCSubtargetInfo &STI);
bool hasG16(const MCSubtargetInfo &STI);
bool hasPackedD16(const MCSubtargetInfo &STI);
bool hasGDS(const MCSubtargetInfo &STI);
unsigned getNSAMaxSize(const MCSubtargetInfo &STI, bool HasSampler = false);
unsigned getMaxNumUserSGPRs(const MCSubtargetInfo &STI);
bool isSI(const MCSubtargetInfo &STI);
bool isCI(const MCSubtargetInfo &STI);
bool isVI(const MCSubtargetInfo &STI);
bool isGFX9(const MCSubtargetInfo &STI);
bool isGFX9_GFX10(const MCSubtargetInfo &STI);
bool isGFX9_GFX10_GFX11(const MCSubtargetInfo &STI);
bool isGFX8_GFX9_GFX10(const MCSubtargetInfo &STI);
bool isGFX8Plus(const MCSubtargetInfo &STI);
bool isGFX9Plus(const MCSubtargetInfo &STI);
bool isNotGFX9Plus(const MCSubtargetInfo &STI);
bool isGFX10(const MCSubtargetInfo &STI);
bool isGFX10_GFX11(const MCSubtargetInfo &STI);
bool isGFX10Plus(const MCSubtargetInfo &STI);
bool isNotGFX10Plus(const MCSubtargetInfo &STI);
bool isGFX10Before1030(const MCSubtargetInfo &STI);
bool isGFX11(const MCSubtargetInfo &STI);
bool isGFX11Plus(const MCSubtargetInfo &STI);
bool isGFX12(const MCSubtargetInfo &STI);
bool isGFX12Plus(const MCSubtargetInfo &STI);
bool isNotGFX12Plus(const MCSubtargetInfo &STI);
bool isNotGFX11Plus(const MCSubtargetInfo &STI);
bool isGCN3Encoding(const MCSubtargetInfo &STI);
bool isGFX10_AEncoding(const MCSubtargetInfo &STI);
bool isGFX10_BEncoding(const MCSubtargetInfo &STI);
bool hasGFX10_3Insts(const MCSubtargetInfo &STI);
bool isGFX10_3_GFX11(const MCSubtargetInfo &STI);
bool isGFX90A(const MCSubtargetInfo &STI);
bool isGFX940(const MCSubtargetInfo &STI);
bool hasArchitectedFlatScratch(const MCSubtargetInfo &STI);
bool hasMAIInsts(const MCSubtargetInfo &STI);
bool hasVOPD(const MCSubtargetInfo &STI);
bool hasDPPSrc1SGPR(const MCSubtargetInfo &STI);
int getTotalNumVGPRs(bool has90AInsts, int32_t ArgNumAGPR, int32_t ArgNumVGPR);
unsigned hasKernargPreload(const MCSubtargetInfo &STI);
bool hasSMRDSignedImmOffset(const MCSubtargetInfo &ST);
bool isSGPR(MCRegister Reg, const MCRegisterInfo *TRI);
bool isHi16Reg(MCRegister Reg, const MCRegisterInfo &MRI);
MCRegister getMCReg(MCRegister Reg, const MCSubtargetInfo &STI);
LLVM_READNONE
MCRegister mc2PseudoReg(MCRegister Reg);
LLVM_READNONE
bool isInlineValue(unsigned Reg);
bool isSISrcOperand(const MCInstrDesc &Desc, unsigned OpNo);
bool isKImmOperand(const MCInstrDesc &Desc, unsigned OpNo);
bool isSISrcFPOperand(const MCInstrDesc &Desc, unsigned OpNo);
bool isSISrcInlinableOperand(const MCInstrDesc &Desc, unsigned OpNo);
unsigned getRegBitWidth(unsigned RCID);
unsigned getRegBitWidth(const MCRegisterClass &RC);
unsigned getRegOperandSize(const MCRegisterInfo *MRI, const MCInstrDesc &Desc,
unsigned OpNo);
LLVM_READNONE
inline unsigned getOperandSize(const MCOperandInfo &OpInfo) { … }
LLVM_READNONE
inline unsigned getOperandSize(const MCInstrDesc &Desc, unsigned OpNo) { … }
LLVM_READNONE
inline bool isInlinableIntLiteral(int64_t Literal) { … }
LLVM_READNONE
bool isInlinableLiteral64(int64_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteral32(int32_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteralBF16(int16_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteralFP16(int16_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteralBF16(int16_t Literal, bool HasInv2Pi);
LLVM_READNONE
bool isInlinableLiteralI16(int32_t Literal, bool HasInv2Pi);
LLVM_READNONE
std::optional<unsigned> getInlineEncodingV2I16(uint32_t Literal);
LLVM_READNONE
std::optional<unsigned> getInlineEncodingV2BF16(uint32_t Literal);
LLVM_READNONE
std::optional<unsigned> getInlineEncodingV2F16(uint32_t Literal);
LLVM_READNONE
bool isInlinableLiteralV216(uint32_t Literal, uint8_t OpType);
LLVM_READNONE
bool isInlinableLiteralV2I16(uint32_t Literal);
LLVM_READNONE
bool isInlinableLiteralV2BF16(uint32_t Literal);
LLVM_READNONE
bool isInlinableLiteralV2F16(uint32_t Literal);
LLVM_READNONE
bool isValid32BitLiteral(uint64_t Val, bool IsFP64);
bool isArgPassedInSGPR(const Argument *Arg);
bool isArgPassedInSGPR(const CallBase *CB, unsigned ArgNo);
LLVM_READONLY
bool isLegalSMRDEncodedUnsignedOffset(const MCSubtargetInfo &ST,
int64_t EncodedOffset);
LLVM_READONLY
bool isLegalSMRDEncodedSignedOffset(const MCSubtargetInfo &ST,
int64_t EncodedOffset,
bool IsBuffer);
uint64_t convertSMRDOffsetUnits(const MCSubtargetInfo &ST, uint64_t ByteOffset);
std::optional<int64_t> getSMRDEncodedOffset(const MCSubtargetInfo &ST,
int64_t ByteOffset, bool IsBuffer,
bool HasSOffset = false);
std::optional<int64_t> getSMRDEncodedLiteralOffset32(const MCSubtargetInfo &ST,
int64_t ByteOffset);
unsigned getNumFlatOffsetBits(const MCSubtargetInfo &ST);
bool isLegalSMRDImmOffset(const MCSubtargetInfo &ST, int64_t ByteOffset);
LLVM_READNONE
inline bool isLegalDPALU_DPPControl(unsigned DC) { … }
bool hasAny64BitVGPROperands(const MCInstrDesc &OpDesc);
bool isDPALU_DPP(const MCInstrDesc &OpDesc);
bool isIntrinsicSourceOfDivergence(unsigned IntrID);
bool isIntrinsicAlwaysUniform(unsigned IntrID);
unsigned getLdsDwGranularity(const MCSubtargetInfo &ST);
}
raw_ostream &operator<<(raw_ostream &OS,
const AMDGPU::IsaInfo::TargetIDSetting S);
}
#endif