13#ifndef LLVM_LIB_TARGET_NVPTX_NVPTXUTILITIES_H
14#define LLVM_LIB_TARGET_NVPTX_NVPTXUTILITIES_H
51SmallVector<unsigned, 3>
getMaxNTID(
const Function &);
52SmallVector<unsigned, 3>
getReqNTID(
const Function &);
60std::optional<unsigned>
getMinCTASm(
const Function &);
61std::optional<unsigned>
getMaxNReg(
const Function &);
72 return F.getAttributes().getAttributes(
Index).getStackAlignment();
75MaybeAlign
getAlign(
const CallInst &,
unsigned);
102 static const auto PackedTypes = {MVT::v4i8, MVT::v2f16, MVT::v2bf16,
103 MVT::v2i16, MVT::v2f32};
119 std::string ValidName;
120 ValidName.reserve(
Name.size() + 4);
124 if (isAlnum(
C) ||
C ==
'_' ||
C ==
'$')
125 ValidName.push_back(
C);
127 ValidName.append({
'_',
'$',
'_'});
143 return "AcquireRelease";
145 return "SequentiallyConsistent";
149 return "RelaxedMMIO";
173 return "DefaultDevice";
195 return "shared::cluster";
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Machine Check Debug Module
This file defines the SmallVector class.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isVectorTy() const
True if this is an instance of VectorType.
bool isBFloatTy() const
Return true if this is 'bfloat', a 16-bit bfloat type.
bool isAggregateType() const
Return true if the type is an aggregate type.
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
LLVM_ABI unsigned getScalarSizeInBits() const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ PTX_Kernel
Call to a PTX kernel. Passes all arguments in parameter space.
@ C
The default llvm calling convention, compatible with C.
raw_ostream & operator<<(raw_ostream &O, Ordering Order)
std::string ScopeToString(Scope S)
unsigned int AddressSpaceUnderlyingType
std::string OrderingToString(Ordering Order)
bool isPackedVectorTy(EVT VT)
unsigned int OrderingUnderlyingType
bool isPackedElementTy(EVT ET)
unsigned int ScopeUnderlyingType
std::string AddressSpaceToString(AddressSpace A)
std::string getValidPTXIdentifier(StringRef Name)
This is an optimization pass for GlobalISel generic memory operations.
bool isManaged(const Value &V)
std::optional< uint64_t > getOverallClusterRank(const Function &F)
bool shouldEmitPTXNoReturn(const Value *V, const TargetMachine &TM)
MaybeAlign getAlign(const CallInst &I, unsigned Index)
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
std::optional< unsigned > getMaxNReg(const Function &F)
StringRef getSamplerName(const Value &V)
bool isImageReadWrite(const Value &V)
bool isImageReadOnly(const Value &V)
std::optional< unsigned > getMinCTASm(const Function &F)
SmallVector< unsigned, 3 > getReqNTID(const Function &F)
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
bool isImage(const Value &V)
bool isSampler(const Value &V)
unsigned promoteScalarArgumentSize(unsigned size)
void clearAnnotationCache(const Module *Mod)
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
bool shouldPassAsArray(Type *Ty)
bool isSurface(const Value &V)
std::optional< unsigned > getMaxClusterRank(const Function &F)
StringRef getTextureName(const Value &V)
SmallVector< unsigned, 3 > getMaxNTID(const Function &F)
bool isParamGridConstant(const Argument &Arg)
StringRef getSurfaceName(const Value &V)
std::optional< uint64_t > getOverallReqNTID(const Function &F)
bool isKernelFunction(const Function &F)
bool isTexture(const Value &V)
Function * getMaybeBitcastedCallee(const CallBase *CB)
bool isImageWriteOnly(const Value &V)
std::optional< uint64_t > getOverallMaxNTID(const Function &F)
bool hasBlocksAreClusters(const Function &F)
SmallVector< unsigned, 3 > getClusterDim(const Function &F)
EVT getVectorElementType() const
Given a vector type, return the type of each element.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.