13#ifndef LLVM_LIB_TARGET_AMDGPU_SIMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_AMDGPU_SIMACHINEFUNCTIONINFO_H
98 std::optional<unsigned>
Mask;
114 if (
Other.IsRegister)
152 auto Keys = YamlIO.
keys();
159 YamlIO.
setError(
"missing required key 'reg' or 'offset'");
256 YamlIO.
mapOptional(
"fp32-input-denormals",
Mode.FP32InputDenormals,
true);
257 YamlIO.
mapOptional(
"fp32-output-denormals",
Mode.FP32OutputDenormals,
true);
258 YamlIO.
mapOptional(
"fp64-fp16-input-denormals",
Mode.FP64FP16InputDenormals,
true);
259 YamlIO.
mapOptional(
"fp64-fp16-output-denormals",
Mode.FP64FP16OutputDenormals,
true);
338 YamlIO.
mapOptional(
"hasNoWWMPoolSGPRSpillFallback",
370 YamlIO.
mapOptional(
"scratchReservedForDynamicVGPRs",
414 const MCRegister FirstVGPRBlock = AMDGPU::VReg_1024RegClass.getRegister(0);
415 return Reg - FirstVGPRBlock;
430 Register ScratchRSrcReg = AMDGPU::PRIVATE_RSRC_REG;
434 Register FrameOffsetReg = AMDGPU::FP_REG;
439 Register StackPtrOffsetReg = AMDGPU::SP_REG;
449 unsigned PSInputAddr = 0;
450 unsigned PSInputEnable = 0;
461 unsigned BytesInStackArgArea = 0;
463 bool ReturnsVoid =
true;
467 std::pair<unsigned, unsigned> FlatWorkGroupSizes = {0, 0};
471 std::pair<unsigned, unsigned> WavesPerEU = {0, 0};
473 const AMDGPUGWSResourcePseudoSourceValue GWSResourcePSV;
476 SmallVector<unsigned> MaxNumWorkGroups = {0, 0, 0};
479 AMDGPU::ClusterDimsAttr ClusterDims;
482 unsigned NumUserSGPRs = 0;
483 unsigned NumSystemSGPRs = 0;
485 unsigned NumWaveDispatchSGPRs = 0;
486 unsigned NumWaveDispatchVGPRs = 0;
488 bool HasSpilledSGPRs =
false;
489 bool HasSpilledVGPRs =
false;
490 bool HasNonSpillStackObjects =
false;
491 bool IsStackRealigned =
false;
493 unsigned NumSpilledSGPRs = 0;
494 unsigned NumSpilledVGPRs = 0;
496 unsigned DynamicVGPRBlockSize = 0;
500 unsigned ScratchReservedForDynamicVGPRs = 0;
504 GCNUserSGPRUsageInfo UserSGPRInfo;
507 bool WorkGroupIDX : 1;
508 bool WorkGroupIDY : 1;
509 bool WorkGroupIDZ : 1;
510 bool WorkGroupInfo : 1;
511 bool LDSKernelId : 1;
512 bool PrivateSegmentWaveByteOffset : 1;
514 bool WorkItemIDX : 1;
515 bool WorkItemIDY : 1;
516 bool WorkItemIDZ : 1;
520 bool ImplicitArgPtr : 1;
524 unsigned MinNumAGPRs = ~0
u;
531 unsigned HighBitsOf32BitAddress;
534 IndexedMap<uint8_t, VirtReg2IndexFunctor> VRegFlags;
548 void MRI_NoteNewVirtualRegister(
Register Reg)
override;
549 void MRI_NoteCloneVirtualRegister(
Register NewReg,
Register SrcReg)
override;
564 SGPRSpillsToVirtualVGPRLanes;
568 SGPRSpillsToPhysicalVGPRLanes;
569 unsigned NumVirtualVGPRSpillLanes = 0;
570 unsigned NumPhysicalVGPRSpillLanes = 0;
580 WWMSpillsMap WWMSpills;
592 ReservedRegSet WWMReservedRegs;
594 bool IsWholeWaveFunction =
false;
596 using PrologEpilogSGPRSpill =
597 std::pair<Register, PrologEpilogSGPRSaveRestoreInfo>;
617 std::optional<int> ScavengeFI;
622 bool HasNoWWMPoolSGPRSpillFallback =
false;
636 bool IsPrologEpilog);
640 return VGPRForAGPRCopy;
644 VGPRForAGPRCopy = NewVGPRForAGPRCopy;
650 MaskForVGPRBlockOps.grow(RegisterBlock);
651 MaskForVGPRBlockOps[RegisterBlock] = Mask;
655 return MaskForVGPRBlockOps[RegisterBlock];
659 return MaskForVGPRBlockOps.inBounds(RegisterBlock);
679 : WWMReservedRegs.contains(
Reg);
690 auto I = SGPRSpillsToVirtualVGPRLanes.find(FrameIndex);
691 return (
I == SGPRSpillsToVirtualVGPRLanes.end())
703 return WWMReservedRegs.contains(
Reg);
710 return PrologEpilogSGPRSpills;
723 PrologEpilogSGPRSpills.insert(
725 PrologEpilogSGPRSpills,
Reg,
726 [](
const auto &
LHS,
const auto &
RHS) {
return LHS <
RHS.first; }),
727 std::make_pair(
Reg,
SI));
733 const auto *
I =
find_if(PrologEpilogSGPRSpills, [&
Reg](
const auto &Spill) {
734 return Spill.first ==
Reg;
736 return I != PrologEpilogSGPRSpills.end();
741 const auto *
I =
find_if(PrologEpilogSGPRSpills, [&
Reg](
const auto &Spill) {
742 return Spill.first ==
Reg;
744 if (
I != PrologEpilogSGPRSpills.end() &&
746 return I->second.getReg();
748 return AMDGPU::NoRegister;
753 for (
const auto &
SI : PrologEpilogSGPRSpills) {
761 return find_if(PrologEpilogSGPRSpills,
764 return SI.second.getKind() ==
766 SI.second.getIndex() == FI;
767 }) != PrologEpilogSGPRSpills.end();
772 auto I =
find_if(PrologEpilogSGPRSpills,
773 [&
Reg](
const auto &Spill) {
return Spill.first ==
Reg; });
774 if (
I == PrologEpilogSGPRSpills.end())
777 PrologEpilogSGPRSpills.erase(
I);
782 const auto *
I =
find_if(PrologEpilogSGPRSpills, [&
Reg](
const auto &Spill) {
783 return Spill.first ==
Reg;
785 assert(
I != PrologEpilogSGPRSpills.end());
792 auto I = SGPRSpillsToPhysicalVGPRLanes.find(FrameIndex);
793 return (
I == SGPRSpillsToPhysicalVGPRLanes.end())
800 if (VRegFlags.inBounds(
Reg))
801 VRegFlags[
Reg] |= Flag;
805 if (
Reg.isPhysical())
808 return VRegFlags.inBounds(
Reg) && VRegFlags[
Reg] & Flag;
834 auto I = VGPRToAGPRSpills.find(FrameIndex);
835 return (
I == VGPRToAGPRSpills.end()) ? (
MCPhysReg)AMDGPU::NoRegister
836 :
I->second.Lanes[Lane];
840 auto I = VGPRToAGPRSpills.find(FrameIndex);
841 if (
I != VGPRToAGPRSpills.end())
842 I->second.IsDead =
true;
852 bool SpillToPhysVGPRLane =
false,
853 bool IsPrologEpilog =
false);
859 bool ResetSGPRSpillStackIDs);
866 return HasNoWWMPoolSGPRSpillFallback;
870 return BytesInStackArgArea;
874 BytesInStackArgArea = Bytes;
882 return ScratchReservedForDynamicVGPRs;
886 ScratchReservedForDynamicVGPRs = SizeInBytes;
901 unsigned AllocSizeDWord,
int KernArgIdx,
915 return ArgInfo.WorkGroupIDX.getRegister();
921 return ArgInfo.WorkGroupIDY.getRegister();
927 return ArgInfo.WorkGroupIDZ.getRegister();
933 return ArgInfo.WorkGroupInfo.getRegister();
940 ArgInfo.WorkItemIDX = Arg;
944 ArgInfo.WorkItemIDY = Arg;
948 ArgInfo.WorkItemIDZ = Arg;
952 ArgInfo.PrivateSegmentWaveByteOffset
955 return ArgInfo.PrivateSegmentWaveByteOffset.getRegister();
975 return WorkGroupInfo;
979 return PrivateSegmentWaveByteOffset;
995 return ImplicitArgPtr;
1006 std::tuple<const ArgDescriptor *, const TargetRegisterClass *, LLT>
1008 return ArgInfo.getPreloadedValue(
Value);
1012 const auto *Arg = std::get<0>(ArgInfo.getPreloadedValue(
Value));
1013 return Arg ? Arg->getRegister() :
MCRegister();
1023 return HighBitsOf32BitAddress;
1027 return NumUserSGPRs;
1031 return NumUserSGPRs + NumSystemSGPRs;
1035 return UserSGPRInfo.getNumKernargPreloadSGPRs();
1047 if (ArgInfo.PrivateSegmentWaveByteOffset)
1048 return ArgInfo.PrivateSegmentWaveByteOffset.getRegister();
1055 return ScratchRSrcReg;
1059 assert(
Reg != 0 &&
"Should never be unset");
1060 ScratchRSrcReg =
Reg;
1064 return FrameOffsetReg;
1068 assert(
Reg != 0 &&
"Should never be unset");
1069 FrameOffsetReg =
Reg;
1073 assert(
Reg != 0 &&
"Should never be unset");
1074 StackPtrOffsetReg =
Reg;
1084 return StackPtrOffsetReg;
1090 return ArgInfo.QueuePtr.getRegister();
1094 return ArgInfo.ImplicitBufferPtr.getRegister();
1098 return HasSpilledSGPRs;
1102 HasSpilledSGPRs = Spill;
1106 return HasSpilledVGPRs;
1110 HasSpilledVGPRs = Spill;
1114 return HasNonSpillStackObjects;
1118 HasNonSpillStackObjects = StackObject;
1122 return IsStackRealigned;
1126 IsStackRealigned = Realigned;
1130 return NumSpilledSGPRs;
1134 return NumSpilledVGPRs;
1138 NumSpilledSGPRs += num;
1142 NumSpilledVGPRs += num;
1150 return PSInputEnable;
1154 return PSInputAddr & (1 << Index);
1158 PSInputAddr |= 1 << Index;
1162 PSInputEnable |= 1 << Index;
1170 ReturnsVoid =
Value;
1176 return FlatWorkGroupSizes;
1181 return FlatWorkGroupSizes.first;
1186 return FlatWorkGroupSizes.second;
1197 return WavesPerEU.first;
1202 return WavesPerEU.second;
1207 return &GWSResourcePSV;
1217 return (Occupancy < 4) ? Occupancy : 4;
1223 if (Occupancy > Limit)
1228 if (Occupancy < Limit)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Provides AMDGPU specific target descriptions.
The AMDGPU TargetMachine interface definition for hw codegen targets.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
AMD GCN specific subclass of TargetSubtarget.
static bool IsRegister(const MCParsedAsmOperand &op)
Register const TargetRegisterInfo * TRI
Promote Memory to Register
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
Interface definition for SIInstrInfo.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallVector class.
void printCustom(raw_ostream &OS) const override
Implement printing for PseudoSourceValue.
static bool classof(const PseudoSourceValue *V)
AMDGPUGWSResourcePseudoSourceValue(const AMDGPUTargetMachine &TM)
bool mayAlias(const MachineFrameInfo *) const override
Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.
bool isAliased(const MachineFrameInfo *) const override
Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Val...
bool isMemoryBound() const
AMDGPUMachineFunctionInfo(const Function &F, const AMDGPUSubtarget &ST)
bool needsWaveLimiter() const
bool isConstant(const MachineFrameInfo *) const override
Test whether the memory pointed to by this PseudoSourceValue has a constant value.
AMDGPUPseudoSourceValue(unsigned Kind, const AMDGPUTargetMachine &TM)
bool mayAlias(const MachineFrameInfo *) const override
Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.
bool isAliased(const MachineFrameInfo *) const override
Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Val...
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
MCRegisterClass - Base class of TargetRegisterClass.
Wrapper class representing physical registers. Should be passed by value.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
This class implements a map that also provides access to all stored values in a deterministic order.
PrologEpilogSGPRSaveRestoreInfo(SGPRSaveKind K, Register R)
PrologEpilogSGPRSaveRestoreInfo(SGPRSaveKind K, int I)
SGPRSaveKind getKind() const
Special value supplied for machine level alias analysis.
PseudoSourceValue(unsigned Kind, const TargetMachine &TM)
Wrapper class representing virtual and physical registers.
This class keeps track of the SPI_SP_INPUT_ADDR config register, which tells the hardware which inter...
unsigned getNumWaveDispatchVGPRs() const
bool hasNonSpillStackObjects() const
ArrayRef< PrologEpilogSGPRSpill > getPrologEpilogSGPRSpills() const
const WWMSpillsMap & getWWMSpills() const
bool isPSInputAllocated(unsigned Index) const
void getAllScratchSGPRCopyDstRegs(SmallVectorImpl< Register > &Regs) const
unsigned getMinNumAGPRs() const
ArrayRef< MCPhysReg > getAGPRSpillVGPRs() const
void setSGPRForEXECCopy(Register Reg)
bool initializeBaseYamlFields(const yaml::SIMachineFunctionInfo &YamlMFI, const MachineFunction &MF, PerFunctionMIParsingState &PFS, SMDiagnostic &Error, SMRange &SourceRange)
unsigned getOccupancy() const
void removePrologEpilogSGPRSpillEntry(Register Reg)
unsigned getNumPreloadedSGPRs() const
void shiftWwmVGPRsToLowestRange(MachineFunction &MF, SmallVectorImpl< Register > &WWMVGPRs, BitVector &SavedVGPRs)
void setWorkItemIDY(ArgDescriptor Arg)
unsigned getNumSpilledVGPRs() const
bool hasLDSKernelId() const
void increaseOccupancy(const MachineFunction &MF, unsigned Limit)
unsigned getNumWaveDispatchSGPRs() const
Register addPrivateSegmentSize(const SIRegisterInfo &TRI)
void setWorkItemIDZ(ArgDescriptor Arg)
std::pair< unsigned, unsigned > getWavesPerEU() const
void setMaskForVGPRBlockOps(Register RegisterBlock, uint32_t Mask)
unsigned getMaxNumWorkGroupsZ() const
MCPhysReg getVGPRToAGPRSpill(int FrameIndex, unsigned Lane) const
unsigned getNumSpilledSGPRs() const
GCNUserSGPRUsageInfo & getUserSGPRInfo()
void allocateWWMSpill(MachineFunction &MF, Register VGPR, uint64_t Size=4, Align Alignment=Align(4))
Register addDispatchPtr(const SIRegisterInfo &TRI)
Register getLongBranchReservedReg() const
void clearPerLaneVGPRAllocMask()
unsigned getDynamicVGPRBlockSize() const
bool hasSpilledVGPRs() const
void setFlag(Register Reg, uint8_t Flag)
void setVGPRToAGPRSpillDead(int FrameIndex)
unsigned getMaxFlatWorkGroupSize() const
bool isWholeWaveFunction() const
std::pair< unsigned, unsigned > getFlatWorkGroupSizes() const
Register getStackPtrOffsetReg() const
bool isStackRealigned() const
Register addFlatScratchInit(const SIRegisterInfo &TRI)
Register getScratchRSrcReg() const
Returns the physical register reserved for use as the resource descriptor for scratch accesses.
unsigned getMaxWavesPerEU() const
void setStackPtrOffsetReg(Register Reg)
Register addReservedUserSGPR()
Increment user SGPRs used for padding the argument list only.
ArrayRef< MCPhysReg > getVGPRSpillAGPRs() const
ArrayRef< Register > getSGPRSpillPhysVGPRs() const
int getScavengeFI(MachineFrameInfo &MFI, const SIRegisterInfo &TRI)
Register addQueuePtr(const SIRegisterInfo &TRI)
bool hasWorkGroupIDZ() const
Register getQueuePtrUserSGPR() const
ArrayRef< SIRegisterInfo::SpilledReg > getSGPRSpillToVirtualVGPRLanes(int FrameIndex) const
uint32_t getMaskForVGPRBlockOps(Register RegisterBlock) const
unsigned getMaxMemoryClusterDWords() const
SIMachineFunctionInfo(const SIMachineFunctionInfo &MFI)=default
bool hasMaskForVGPRBlockOps(Register RegisterBlock) const
AMDGPU::ClusterDimsAttr getClusterDims() const
void setNoWWMPoolSGPRSpillFallback()
SmallVector< unsigned > getMaxNumWorkGroups() const
bool hasPrologEpilogSGPRSpillEntry(Register Reg) const
Register getGITPtrLoReg(const MachineFunction &MF) const
bool hasWorkGroupIDY() const
void setVGPRForAGPRCopy(Register NewVGPRForAGPRCopy)
bool allocateVGPRSpillToAGPR(MachineFunction &MF, int FI, bool isAGPRtoVGPR)
Reserve AGPRs or VGPRs to support spilling for FrameIndex FI.
Register addWorkGroupIDY()
bool hasNoWWMPoolSGPRSpillFallback() const
void splitWWMSpillRegisters(MachineFunction &MF, SmallVectorImpl< std::pair< Register, int > > &CalleeSavedRegs, SmallVectorImpl< std::pair< Register, int > > &ScratchRegs) const
void setBytesInStackArgArea(unsigned Bytes)
void setNumWaveDispatchSGPRs(unsigned Count)
SIModeRegisterDefaults getMode() const
Register getSGPRForEXECCopy() const
void setFrameOffsetReg(Register Reg)
bool isWWMReservedRegister(Register Reg) const
ArrayRef< SIRegisterInfo::SpilledReg > getSGPRSpillToPhysicalVGPRLanes(int FrameIndex) const
Register addPrivateSegmentWaveByteOffset()
std::tuple< const ArgDescriptor *, const TargetRegisterClass *, LLT > getPreloadedValue(AMDGPUFunctionArgInfo::PreloadedValue Value) const
bool hasWorkGroupInfo() const
bool mayUseAGPRs(const Function &F) const
bool isCalleeSavedReg(const MCPhysReg *CSRegs, MCPhysReg Reg) const
friend class GCNTargetMachine
bool hasWorkItemIDY() const
unsigned getMinFlatWorkGroupSize() const
Register addLDSKernelId()
Register getVGPRForAGPRCopy() const
const GCNUserSGPRUsageInfo & getUserSGPRInfo() const
bool allocateSGPRSpillToVGPRLane(MachineFunction &MF, int FI, bool SpillToPhysVGPRLane=false, bool IsPrologEpilog=false)
void setPrivateSegmentWaveByteOffset(Register Reg)
unsigned getMinWavesPerEU() const
Register getFrameOffsetReg() const
void setLongBranchReservedReg(Register Reg)
bool hasWorkGroupIDX() const
const AMDGPUFunctionArgInfo & getArgInfo() const
unsigned getMaxNumWorkGroupsX() const
unsigned getBytesInStackArgArea() const
Register addKernargSegmentPtr(const SIRegisterInfo &TRI)
Register addDispatchID(const SIRegisterInfo &TRI)
void setHasSpilledVGPRs(bool Spill=true)
void setIfReturnsVoid(bool Value)
void limitOccupancy(unsigned Limit)
bool removeDeadFrameIndices(MachineFrameInfo &MFI, bool ResetSGPRSpillStackIDs)
If ResetSGPRSpillStackIDs is true, reset the stack ID from sgpr-spill to the default stack.
void setScratchReservedForDynamicVGPRs(unsigned SizeInBytes)
void markPSInputAllocated(unsigned Index)
void setWorkItemIDX(ArgDescriptor Arg)
BitVector getPerLaneVGPRMask() const
bool isWWMReg(Register Reg) const
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
bool checkFlag(Register Reg, uint8_t Flag) const
void setNumWaveDispatchVGPRs(unsigned Count)
void markPSInputEnabled(unsigned Index)
void addToSpilledVGPRs(unsigned num)
MCRegister getPreloadedReg(AMDGPUFunctionArgInfo::PreloadedValue Value) const
uint32_t get32BitAddressHighBits() const
unsigned getMinAllowedOccupancy() const
void setHasSpilledSGPRs(bool Spill=true)
bool checkIndexInPrologEpilogSGPRSpills(int FI) const
bool selectAGPRFormMFMA(unsigned NumRegs) const
Return true if an MFMA that requires at least NumRegs should select to the AGPR form,...
unsigned getNumKernargPreloadedSGPRs() const
Register addPrivateSegmentBuffer(const SIRegisterInfo &TRI)
bool hasWorkItemIDX() const
unsigned getNumUserSGPRs() const
unsigned getScratchReservedForDynamicVGPRs() const
const ReservedRegSet & getWWMReservedRegs() const
void updatePerLaneVGPRMask(BitVector &RegMask)
Register getImplicitBufferPtrUserSGPR() const
std::optional< int > getOptionalScavengeFI() const
Register addImplicitBufferPtr(const SIRegisterInfo &TRI)
AMDGPUFunctionArgInfo & getArgInfo()
const PrologEpilogSGPRSaveRestoreInfo & getPrologEpilogSGPRSaveRestoreInfo(Register Reg) const
bool isDynamicVGPREnabled() const
void setHasNonSpillStackObjects(bool StackObject=true)
void setIsStackRealigned(bool Realigned=true)
unsigned getGITPtrHigh() const
void limitOccupancy(const MachineFunction &MF)
bool hasSpilledSGPRs() const
ArrayRef< Register > getSGPRSpillVGPRs() const
unsigned getPSInputAddr() const
SmallVectorImpl< MCRegister > * addPreloadedKernArg(const SIRegisterInfo &TRI, const TargetRegisterClass *RC, unsigned AllocSizeDWord, int KernArgIdx, int PaddingSGPRs)
void addToPrologEpilogSGPRSpills(Register Reg, PrologEpilogSGPRSaveRestoreInfo SI)
Register getScratchSGPRCopyDstReg(Register Reg) const
Register getPrivateSegmentWaveByteOffsetSystemSGPR() const
bool hasImplicitArgPtr() const
Register addWorkGroupIDZ()
Register addWorkGroupInfo()
bool hasWorkItemIDZ() const
unsigned getMaxNumWorkGroupsY() const
unsigned getPSInputEnable() const
void setScratchRSrcReg(Register Reg)
void addToSpilledSGPRs(unsigned num)
const AMDGPUGWSResourcePseudoSourceValue * getGWSPSV(const AMDGPUTargetMachine &TM)
void reserveWWMRegister(Register Reg)
bool hasPrivateSegmentWaveByteOffset() const
Register addWorkGroupIDX()
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Represents a range in source code.
A SetVector that performs no allocations if smaller than a certain size.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
virtual bool outputting() const =0
void mapOptional(StringRef Key, T &Val)
virtual void setError(const Twine &)=0
void mapRequired(StringRef Key, T &Val)
virtual std::vector< StringRef > keys()=0
This is an optimization pass for GlobalISel generic memory operations.
auto upper_bound(R &&Range, T &&Value)
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...
bool is_sorted(R &&Range, Compare C)
Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
ArrayRef(const T &OneElt) -> ArrayRef< T >
constexpr unsigned DefaultMemoryClusterDWordsLimit
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Next
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
MCRegisterClass TargetRegisterClass
This struct is a compact representation of a valid (non-zero power of two) alignment.
static ArgDescriptor createRegister(Register Reg, unsigned Mask=~0u)
@ PreserveSign
The sign of a flushed-to-zero number is preserved in the sign of 0.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
SmallVector< MCPhysReg, 32 > Lanes
unsigned operator()(Register Reg) const
Function object to check whether the first component of a container supported by std::get (like std::...
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
static void mapping(IO &YamlIO, SIArgumentInfo &AI)
static void mapping(IO &YamlIO, SIArgument &A)
static void mapping(IO &YamlIO, SIMachineFunctionInfo &MFI)
static void mapping(IO &YamlIO, SIMode &Mode)
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
std::optional< SIArgument > PrivateSegmentWaveByteOffset
std::optional< SIArgument > WorkGroupIDY
std::optional< SIArgument > FlatScratchInit
std::optional< SIArgument > DispatchPtr
std::optional< SIArgument > DispatchID
std::optional< SIArgument > WorkItemIDY
std::optional< SIArgument > WorkGroupIDX
std::optional< SIArgument > ImplicitArgPtr
std::optional< SIArgument > QueuePtr
std::optional< SIArgument > WorkGroupInfo
std::optional< SIArgument > LDSKernelId
std::optional< SIArgument > ImplicitBufferPtr
std::optional< SIArgument > WorkItemIDX
std::optional< SIArgument > KernargSegmentPtr
std::optional< SIArgument > WorkItemIDZ
std::optional< SIArgument > PrivateSegmentSize
std::optional< SIArgument > PrivateSegmentBuffer
std::optional< SIArgument > FirstKernArgPreloadReg
std::optional< SIArgument > WorkGroupIDZ
std::optional< unsigned > Mask
SIArgument(const SIArgument &Other)
SIArgument & operator=(const SIArgument &Other)
static SIArgument createArgument(bool IsReg)
~SIMachineFunctionInfo() override=default
unsigned MaxMemoryClusterDWords
StringValue SGPRForEXECCopy
bool HasNoWWMPoolSGPRSpillFallback
SmallVector< StringValue > WWMReservedRegs
uint32_t HighBitsOf32BitAddress
SIMachineFunctionInfo()=default
StringValue FrameOffsetReg
StringValue LongBranchReservedReg
unsigned NumKernargPreloadSGPRs
uint64_t ExplicitKernArgSize
uint16_t NumWaveDispatchSGPRs
void mappingImpl(yaml::IO &YamlIO) override
StringValue VGPRForAGPRCopy
std::optional< SIArgumentInfo > ArgInfo
std::optional< unsigned > DynamicVGPRBlockSize
SmallVector< StringValue, 2 > SpillPhysVGPRS
std::optional< FrameIndex > ScavengeFI
uint16_t NumWaveDispatchVGPRs
unsigned BytesInStackArgArea
unsigned ScratchReservedForDynamicVGPRs
StringValue ScratchRSrcReg
StringValue StackPtrOffsetReg
SIMode(const SIModeRegisterDefaults &Mode)
bool FP64FP16OutputDenormals
bool operator==(const SIMode Other) const
bool FP64FP16InputDenormals
A wrapper around std::string which contains a source range that's being set during parsing.