43 #define GET_INSTRINFO_NAMED_OPS 44 #define GET_INSTRMAP_INFO 45 #include "AMDGPUGenInstrInfo.inc" 46 #undef GET_INSTRMAP_INFO 47 #undef GET_INSTRINFO_NAMED_OPS 52 unsigned getBitMask(
unsigned Shift,
unsigned Width) {
53 return ((1 << Width) - 1) << Shift;
59 unsigned packBits(
unsigned Src,
unsigned Dst,
unsigned Shift,
unsigned Width) {
60 Dst &= ~(1 << Shift) & ~getBitMask(Shift, Width);
61 Dst |= (Src << Shift) & getBitMask(Shift, Width);
68 unsigned unpackBits(
unsigned Src,
unsigned Shift,
unsigned Width) {
69 return (Src & getBitMask(Shift, Width)) >> Shift;
73 unsigned getVmcntBitShiftLo() {
return 0; }
76 unsigned getVmcntBitWidthLo() {
return 4; }
79 unsigned getExpcntBitShift() {
return 4; }
82 unsigned getExpcntBitWidth() {
return 3; }
85 unsigned getLgkmcntBitShift() {
return 8; }
88 unsigned getLgkmcntBitWidth() {
return 4; }
91 unsigned getVmcntBitShiftHi() {
return 14; }
94 unsigned getVmcntBitWidthHi() {
return 2; }
110 #define GET_MIMGBaseOpcodesTable_IMPL 111 #define GET_MIMGDimInfoTable_IMPL 112 #define GET_MIMGInfoTable_IMPL 113 #define GET_MIMGLZMappingTable_IMPL 114 #include "AMDGPUGenSearchableTables.inc" 118 const MIMGInfo *
Info = getMIMGOpcodeHelper(BaseOpcode, MIMGEncoding,
119 VDataDwords, VAddrDwords);
120 return Info ? Info->
Opcode : -1;
124 const MIMGInfo *OrigInfo = getMIMGInfo(Opc);
128 return NewInfo ? NewInfo->
Opcode : -1;
140 #define GET_MUBUFInfoTable_DECL 141 #define GET_MUBUFInfoTable_IMPL 142 #include "AMDGPUGenSearchableTables.inc" 150 const MUBUFInfo *
Info = getMUBUFInfoFromBaseOpcodeAndDwords(BaseOpc, Dwords);
151 return Info ? Info->
Opcode : -1;
156 return Info ? Info->
dwords : 0;
178 return getMCOpcodeGen(Opcode, static_cast<Subtarget>(Gen));
187 Stream << TargetTriple.getArchName() <<
'-' 188 << TargetTriple.getVendorName() <<
'-' 189 << TargetTriple.getOSName() <<
'-' 190 << TargetTriple.getEnvironmentName() <<
'-' 199 Stream <<
"+sram-ecc";
232 unsigned FlatWorkGroupSize) {
239 return std::min(N, 16u);
247 unsigned FlatWorkGroupSize) {
261 unsigned FlatWorkGroupSize) {
275 unsigned FlatWorkGroupSize) {
282 if (Version.
Major >= 8)
293 if (Version.
Major >= 8)
303 if (Version.
Major >= 8)
327 if (Version.
Major >= 8 && !Addressable)
328 AddressableNumSGPRs = 112;
333 return std::min(MaxNumSGPRs, AddressableNumSGPRs);
337 bool FlatScrUsed,
bool XNACKUsed) {
338 unsigned ExtraSGPRs = 0;
343 if (Version.
Major < 8) {
390 unsigned MinNumVGPRs =
402 return std::min(MaxNumVGPRs, AddressableNumVGPRs);
417 memset(&Header, 0,
sizeof(Header));
442 memset(&KD, 0,
sizeof(KD));
444 amdhsa::COMPUTE_PGM_RSRC1_FLOAT_DENORM_MODE_16_64,
447 amdhsa::COMPUTE_PGM_RSRC1_ENABLE_DX10_CLAMP, 1);
449 amdhsa::COMPUTE_PGM_RSRC1_ENABLE_IEEE_MODE, 1);
451 amdhsa::COMPUTE_PGM_RSRC2_ENABLE_SGPR_WORKGROUP_ID_X, 1);
474 int Result = Default;
480 Ctx.
emitError(
"can't parse integer attribute " + Name);
489 std::pair<int, int> Default,
490 bool OnlyFirstRequired) {
496 std::pair<int, int> Ints = Default;
498 if (Strs.first.trim().getAsInteger(0, Ints.first)) {
499 Ctx.
emitError(
"can't parse first integer attribute " + Name);
502 if (Strs.second.trim().getAsInteger(0, Ints.second)) {
503 if (!OnlyFirstRequired || !Strs.second.trim().empty()) {
504 Ctx.
emitError(
"can't parse second integer attribute " + Name);
513 unsigned VmcntLo = (1 << getVmcntBitWidthLo()) - 1;
514 if (Version.
Major < 9)
517 unsigned VmcntHi = ((1 << getVmcntBitWidthHi()) - 1) << getVmcntBitWidthLo();
518 return VmcntLo | VmcntHi;
522 return (1 << getExpcntBitWidth()) - 1;
526 return (1 << getLgkmcntBitWidth()) - 1;
530 unsigned VmcntLo = getBitMask(getVmcntBitShiftLo(), getVmcntBitWidthLo());
531 unsigned Expcnt = getBitMask(getExpcntBitShift(), getExpcntBitWidth());
532 unsigned Lgkmcnt = getBitMask(getLgkmcntBitShift(), getLgkmcntBitWidth());
533 unsigned Waitcnt = VmcntLo | Expcnt | Lgkmcnt;
534 if (Version.
Major < 9)
537 unsigned VmcntHi = getBitMask(getVmcntBitShiftHi(), getVmcntBitWidthHi());
538 return Waitcnt | VmcntHi;
543 unpackBits(Waitcnt, getVmcntBitShiftLo(), getVmcntBitWidthLo());
544 if (Version.
Major < 9)
548 unpackBits(Waitcnt, getVmcntBitShiftHi(), getVmcntBitWidthHi());
549 VmcntHi <<= getVmcntBitWidthLo();
550 return VmcntLo | VmcntHi;
554 return unpackBits(Waitcnt, getExpcntBitShift(), getExpcntBitWidth());
558 return unpackBits(Waitcnt, getLgkmcntBitShift(), getLgkmcntBitWidth());
562 unsigned &Vmcnt,
unsigned &Expcnt,
unsigned &Lgkmcnt) {
579 packBits(Vmcnt, Waitcnt, getVmcntBitShiftLo(), getVmcntBitWidthLo());
580 if (Version.
Major < 9)
583 Vmcnt >>= getVmcntBitWidthLo();
584 return packBits(Vmcnt, Waitcnt, getVmcntBitShiftHi(), getVmcntBitWidthHi());
589 return packBits(Expcnt, Waitcnt, getExpcntBitShift(), getExpcntBitWidth());
594 return packBits(Lgkmcnt, Waitcnt, getLgkmcntBitShift(), getLgkmcntBitWidth());
598 unsigned Vmcnt,
unsigned Expcnt,
unsigned Lgkmcnt) {
688 const unsigned FirstSubReg = TRI->
getSubReg(Reg, 1);
689 return SGPRClass.
contains(FirstSubReg != 0 ? FirstSubReg : Reg) ||
695 if (*R == Reg1)
return true;
700 #define MAP_REG2REG \ 701 using namespace AMDGPU; \ 703 default: return Reg; \ 704 CASE_CI_VI(FLAT_SCR) \ 705 CASE_CI_VI(FLAT_SCR_LO) \ 706 CASE_CI_VI(FLAT_SCR_HI) \ 707 CASE_VI_GFX9(TTMP0) \ 708 CASE_VI_GFX9(TTMP1) \ 709 CASE_VI_GFX9(TTMP2) \ 710 CASE_VI_GFX9(TTMP3) \ 711 CASE_VI_GFX9(TTMP4) \ 712 CASE_VI_GFX9(TTMP5) \ 713 CASE_VI_GFX9(TTMP6) \ 714 CASE_VI_GFX9(TTMP7) \ 715 CASE_VI_GFX9(TTMP8) \ 716 CASE_VI_GFX9(TTMP9) \ 717 CASE_VI_GFX9(TTMP10) \ 718 CASE_VI_GFX9(TTMP11) \ 719 CASE_VI_GFX9(TTMP12) \ 720 CASE_VI_GFX9(TTMP13) \ 721 CASE_VI_GFX9(TTMP14) \ 722 CASE_VI_GFX9(TTMP15) \ 723 CASE_VI_GFX9(TTMP0_TTMP1) \ 724 CASE_VI_GFX9(TTMP2_TTMP3) \ 725 CASE_VI_GFX9(TTMP4_TTMP5) \ 726 CASE_VI_GFX9(TTMP6_TTMP7) \ 727 CASE_VI_GFX9(TTMP8_TTMP9) \ 728 CASE_VI_GFX9(TTMP10_TTMP11) \ 729 CASE_VI_GFX9(TTMP12_TTMP13) \ 730 CASE_VI_GFX9(TTMP14_TTMP15) \ 731 CASE_VI_GFX9(TTMP0_TTMP1_TTMP2_TTMP3) \ 732 CASE_VI_GFX9(TTMP4_TTMP5_TTMP6_TTMP7) \ 733 CASE_VI_GFX9(TTMP8_TTMP9_TTMP10_TTMP11) \ 734 CASE_VI_GFX9(TTMP12_TTMP13_TTMP14_TTMP15) \ 735 CASE_VI_GFX9(TTMP0_TTMP1_TTMP2_TTMP3_TTMP4_TTMP5_TTMP6_TTMP7) \ 736 CASE_VI_GFX9(TTMP4_TTMP5_TTMP6_TTMP7_TTMP8_TTMP9_TTMP10_TTMP11) \ 737 CASE_VI_GFX9(TTMP8_TTMP9_TTMP10_TTMP11_TTMP12_TTMP13_TTMP14_TTMP15) \ 738 CASE_VI_GFX9(TTMP0_TTMP1_TTMP2_TTMP3_TTMP4_TTMP5_TTMP6_TTMP7_TTMP8_TTMP9_TTMP10_TTMP11_TTMP12_TTMP13_TTMP14_TTMP15) \ 741 #define CASE_CI_VI(node) \ 742 assert(!isSI(STI)); \ 743 case node: return isCI(STI) ? node##_ci : node##_vi; 745 #define CASE_VI_GFX9(node) \ 746 case node: return isGFX9(STI) ? node##_gfx9 : node##_vi; 757 #define CASE_CI_VI(node) case node##_ci: case node##_vi: return node; 758 #define CASE_VI_GFX9(node) case node##_vi: case node##_gfx9: return node; 803 case AMDGPU::SGPR_32RegClassID:
804 case AMDGPU::VGPR_32RegClassID:
805 case AMDGPU::VS_32RegClassID:
806 case AMDGPU::SReg_32RegClassID:
807 case AMDGPU::SReg_32_XM0RegClassID:
809 case AMDGPU::SGPR_64RegClassID:
810 case AMDGPU::VS_64RegClassID:
811 case AMDGPU::SReg_64RegClassID:
812 case AMDGPU::VReg_64RegClassID:
813 case AMDGPU::SReg_64_XEXECRegClassID:
815 case AMDGPU::VReg_96RegClassID:
817 case AMDGPU::SGPR_128RegClassID:
818 case AMDGPU::SReg_128RegClassID:
819 case AMDGPU::VReg_128RegClassID:
821 case AMDGPU::SReg_256RegClassID:
822 case AMDGPU::VReg_256RegClassID:
824 case AMDGPU::SReg_512RegClassID:
825 case AMDGPU::VReg_512RegClassID:
844 if (Literal >= -16 && Literal <= 64)
847 uint64_t Val =
static_cast<uint64_t
>(Literal);
857 (Val == 0x3fc45f306dc9c882 && HasInv2Pi);
861 if (Literal >= -16 && Literal <= 64)
883 (Val == 0x3e22f983 && HasInv2Pi);
890 if (Literal >= -16 && Literal <= 64)
893 uint16_t Val =
static_cast<uint16_t
>(Literal);
894 return Val == 0x3C00 ||
908 int16_t Lo16 =
static_cast<int16_t
>(Literal);
909 int16_t Hi16 =
static_cast<int16_t
>(Literal >> 16);
942 return ByteOffset >> 2;
948 isUInt<20>(EncodedOffset) :
isUInt<8>(EncodedOffset);
964 if (Imm <= MaxImm + 64) {
966 Overflow = Imm - MaxImm;
981 Overflow = High -
Align;
999 struct SourceOfDivergence {
1002 const SourceOfDivergence *lookupSourceOfDivergence(
unsigned Intr);
1004 #define GET_SourcesOfDivergence_IMPL 1005 #include "AMDGPUGenSearchableTables.inc" 1010 return lookupSourceOfDivergence(IntrID);
int getMUBUFOpcode(unsigned BaseOpc, unsigned Dwords)
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
unsigned mc2PseudoReg(unsigned Reg)
Convert hardware register Reg to a pseudo register.
bool hasPackedD16(const MCSubtargetInfo &STI)
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
This class represents an incoming formal argument to a Function.
bool getMUBUFHasSrsrc(unsigned Opc)
This class represents lattice values for constants.
unsigned getMaxWorkGroupsPerCU(const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
unsigned getExpcntBitMask(const IsaVersion &Version)
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Represents the counter values to wait for in an s_waitcnt instruction.
Describe properties that are true of each instruction in the target description file.
unsigned getRegBitWidth(unsigned RCID)
Get the size in bits of a register from the register class RC.
Address space for 32-bit constant memory.
unsigned getMaxWavesPerCU(const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
Instruction set architecture version.
unsigned decodeVmcnt(const IsaVersion &Version, unsigned Waitcnt)
unsigned const TargetRegisterInfo * TRI
uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Alig...
bool isInlinableLiteralV216(int32_t Literal, bool HasInv2Pi)
unsigned encodeVmcnt(const IsaVersion &Version, unsigned Waitcnt, unsigned Vmcnt)
int getMUBUFDwords(unsigned Opc)
unsigned decodeExpcnt(const IsaVersion &Version, unsigned Waitcnt)
unsigned getSGPREncodingGranule(const MCSubtargetInfo *STI)
std::pair< int, int > getIntegerPairAttribute(const Function &F, StringRef Name, std::pair< int, int > Default, bool OnlyFirstRequired)
const Triple & getTargetTriple() const
bool isGlobalSegment(const GlobalValue *GV)
bool isInlinableLiteral16(int16_t Literal, bool HasInv2Pi)
amdhsa::kernel_descriptor_t getDefaultAmdhsaKernelDescriptor()
unsigned getID() const
getID() - Return the register class ID number.
uint32_t amd_kernel_code_version_major
Calling convention used for Mesa/AMDPAL geometry shaders.
uint64_t alignDown(uint64_t Value, uint64_t Align, uint64_t Skew=0)
Returns the largest uint64_t less than or equal to Value and is Skew mod Align.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
unsigned getWavesPerWorkGroup(const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
Address space for constant memory (VTX2)
Calling convention used for Mesa/AMDPAL compute shaders.
bool isRegIntersect(unsigned Reg0, unsigned Reg1, const MCRegisterInfo *TRI)
Is there any intersection between registers.
bool isStringAttribute() const
Return true if the attribute is a string (target-dependent) attribute.
bool contains(unsigned Reg) const
contains - Return true if the specified register is included in this register class.
const FeatureBitset & getFeatureBits() const
AMD Kernel Code Object (amd_kernel_code_t).
unsigned getLocalMemorySize(const MCSubtargetInfo *STI)
SPIR_KERNEL - Calling convention for SPIR kernel functions.
unsigned getRegOperandSize(const MCRegisterInfo *MRI, const MCInstrDesc &Desc, unsigned OpNo)
Get size of register operand.
uint16_t amd_machine_version_major
unsigned getNumVGPRBlocks(const MCSubtargetInfo *STI, unsigned NumVGPRs)
This file contains the simple types necessary to represent the attributes associated with functions a...
uint32_t compute_pgm_rsrc2
int getMaskedMIMGOp(unsigned Opc, unsigned NewChannels)
unsigned getMaxNumSGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU, bool Addressable)
bool hasCodeObjectV3(const MCSubtargetInfo *STI)
unsigned getTotalNumVGPRs(const MCSubtargetInfo *STI)
int getMCOpcode(uint16_t Opcode, unsigned Gen)
void emitError(unsigned LocCookie, const Twine &ErrorStr)
emitError - Emit an error message to the currently installed error handler with optional location inf...
uint8_t OperandType
Information about the type of the operand.
unsigned getMinWavesPerEU(const MCSubtargetInfo *STI)
uint8_t kernarg_segment_alignment
The maximum byte alignment of variables used by the kernel in the specified memory segment...
Calling convention used for AMDPAL shader stage before geometry shader if geometry is in use...
unsigned getVGPRAllocGranule(const MCSubtargetInfo *STI)
unsigned getMinFlatWorkGroupSize(const MCSubtargetInfo *STI)
bool splitMUBUFOffset(uint32_t Imm, uint32_t &SOffset, uint32_t &ImmOffset, const GCNSubtarget *Subtarget, uint32_t Align)
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
uint8_t group_segment_alignment
bool isGroupSegment(const GlobalValue *GV)
unsigned encodeWaitcnt(const IsaVersion &Version, unsigned Vmcnt, unsigned Expcnt, unsigned Lgkmcnt)
Encodes Vmcnt, Expcnt and Lgkmcnt into Waitcnt for given isa Version.
unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU)
bool isReadOnlySegment(const GlobalValue *GV)
unsigned encodeExpcnt(const IsaVersion &Version, unsigned Waitcnt, unsigned Expcnt)
AttributeList getAttributes() const
Return the attribute list for this Function.
uint16_t amd_machine_version_minor
unsigned decodeLgkmcnt(const IsaVersion &Version, unsigned Waitcnt)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
uint32_t amd_kernel_code_version_minor
MCRegisterClass - Base class of TargetRegisterClass.
Calling convention used for Mesa vertex shaders, or AMDPAL last shader stage before rasterization (ve...
Analysis containing CSE Info
unsigned short NumOperands
uint32_t FloatToBits(float Float)
This function takes a float and returns the bit equivalent 32-bit integer.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
bool isSISrcFPOperand(const MCInstrDesc &Desc, unsigned OpNo)
Is this floating-point operand?
bool hasSRAMECC(const MCSubtargetInfo &STI)
int64_t getSMRDEncodedOffset(const MCSubtargetInfo &ST, int64_t ByteOffset)
bool isCompute(CallingConv::ID cc)
bool isInlinableLiteral64(int64_t Literal, bool HasInv2Pi)
Is this literal inlinable.
bool isSI(const MCSubtargetInfo &STI)
unsigned getMinNumSGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU)
constexpr bool isUInt< 8 >(uint64_t x)
unsigned const MachineRegisterInfo * MRI
bool getMUBUFHasSoffset(unsigned Opc)
unsigned getEUsPerCU(const MCSubtargetInfo *STI)
This is an important class for using LLVM in a threaded context.
bool hasMIMG_R128(const MCSubtargetInfo &STI)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isEntryFunctionCC(CallingConv::ID CC)
unsigned getSubReg(unsigned Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo...
int getMUBUFBaseOpcode(unsigned Opc)
uint8_t private_segment_alignment
bool isIntrinsicSourceOfDivergence(unsigned IntrID)
MCRegAliasIterator enumerates all registers aliasing Reg.
Address space for local memory.
Calling convention used for AMDPAL vertex shader if tessellation is in use.
Generation getGeneration() const
unsigned getAddressSpace() const
Return the address space of the Pointer type.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
bool isLegalSMRDImmOffset(const MCSubtargetInfo &ST, int64_t ByteOffset)
Address space for global memory (RAT0, VTX0).
Calling convention used for Mesa/AMDPAL pixel shaders.
bool isSISrcInlinableOperand(const MCInstrDesc &Desc, unsigned OpNo)
Does this opearnd support only inlinable literals?
#define AMDHSA_BITS_SET(DST, MSK, VAL)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr char NumSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSGPRs.
Triple - Helper class for working with autoconf configuration names.
int getMIMGOpcode(unsigned BaseOpcode, unsigned MIMGEncoding, unsigned VDataDwords, unsigned VAddrDwords)
std::enable_if< std::numeric_limits< T >::is_signed, bool >::type getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
IsaVersion getIsaVersion(StringRef GPU)
unsigned getVGPREncodingGranule(const MCSubtargetInfo *STI)
bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const
Equivalent to hasAttribute(ArgNo + FirstArgIndex, Kind).
unsigned getWavefrontSize(const MCSubtargetInfo *STI)
unsigned getTotalNumSGPRs(const MCSubtargetInfo *STI)
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
unsigned getAddressableNumSGPRs(const MCSubtargetInfo *STI)
Module.h This file contains the declarations for the Module class.
LLVM_NODISCARD std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
uint16_t amd_machine_version_stepping
uint8_t wavefront_size
Wavefront size expressed as a power of two.
bool isArgPassedInSGPR(const Argument *A)
uint64_t DoubleToBits(double Double)
This function takes a double and returns the bit equivalent 64-bit integer.
unsigned getNumExtraSGPRs(const MCSubtargetInfo *STI, bool VCCUsed, bool FlatScrUsed)
bool isShader(CallingConv::ID cc)
unsigned getArgNo() const
Return the index of this formal argument in its containing function.
unsigned getMaxFlatWorkGroupSize(const MCSubtargetInfo *STI)
constexpr char NumVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumVGPRs.
bool isGCN3Encoding(const MCSubtargetInfo &STI)
bool isCI(const MCSubtargetInfo &STI)
unsigned getAddressableNumVGPRs(const MCSubtargetInfo *STI)
unsigned getInitialPSInputAddr(const Function &F)
uint32_t compute_pgm_rsrc1
bool isGFX9(const MCSubtargetInfo &STI)
Provides AMDGPU specific target descriptions.
const Function * getParent() const
bool isVI(const MCSubtargetInfo &STI)
StringRef getValueAsString() const
Return the attribute's value as a string.
unsigned getNumSGPRBlocks(const MCSubtargetInfo *STI, unsigned NumSGPRs)
int16_t RegClass
This specifies the register class enumeration of the operand if the operand is a register.
bool hasXNACK(const MCSubtargetInfo &STI)
Calling convention used for Mesa/AMDPAL hull shaders (= tessellation control shaders).
int getIntegerAttribute(const Function &F, StringRef Name, int Default)
Generic base class for all target subtargets.
unsigned getWaitcntBitMask(const IsaVersion &Version)
bool shouldEmitConstantsToTextSection(const Triple &TT)
int64_t kernel_code_entry_byte_offset
Byte offset (possibly negative) from start of amd_kernel_code_t object to kernel's entry point instru...
bool isSISrcOperand(const MCInstrDesc &Desc, unsigned OpNo)
Can this operand also contain immediate values?
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isInlinableLiteral32(int32_t Literal, bool HasInv2Pi)
const MCOperandInfo * OpInfo
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
unsigned getMCReg(unsigned Reg, const MCSubtargetInfo &STI)
If Reg is a pseudo reg, return the correct hardware register given STI otherwise return Reg...
This class implements an extremely fast bulk output stream that can only output to a stream...
uint16_t amd_machine_kind
unsigned getMinNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU)
StringRef - Represent a constant reference to a string, i.e.
unsigned getLgkmcntBitMask(const IsaVersion &Version)
bool getMUBUFHasVAddr(unsigned Opc)
bool isSGPR(unsigned Reg, const MCRegisterInfo *TRI)
Is Reg - scalar register.
unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header, const MCSubtargetInfo *STI)
Calling convention for AMDGPU code object kernels.
unsigned getSGPRAllocGranule(const MCSubtargetInfo *STI)
unsigned encodeLgkmcnt(const IsaVersion &Version, unsigned Waitcnt, unsigned Lgkmcnt)
PointerType * getType() const
Global values are always pointers.
void streamIsaVersion(const MCSubtargetInfo *STI, raw_ostream &Stream)
Streams isa version string for given subtarget STI into Stream.
const MCRegisterClass & getRegClass(unsigned i) const
Returns the register class associated with the enumeration value.
unsigned getVmcntBitMask(const IsaVersion &Version)
void decodeWaitcnt(const IsaVersion &Version, unsigned Waitcnt, unsigned &Vmcnt, unsigned &Expcnt, unsigned &Lgkmcnt)
Decodes Vmcnt, Expcnt and Lgkmcnt from given Waitcnt for given isa Version, and writes decoded values...