LLVM 23.0.0git
NVVMProperties.cpp File Reference
#include "NVVMProperties.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ModRef.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/NVVMAttributes.h"
#include <functional>
#include <map>
#include <mutex>
#include <numeric>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

Functions

static AnnotationCache & getAnnotationCache ()
constexpr StringLiteral NVVMMetadata::Texture ("texture")
constexpr StringLiteral NVVMMetadata::Surface ("surface")
constexpr StringLiteral NVVMMetadata::Sampler ("sampler")
constexpr StringLiteral NVVMMetadata::ReadOnlyImage ("rdoimage")
constexpr StringLiteral NVVMMetadata::WriteOnlyImage ("wroimage")
constexpr StringLiteral NVVMMetadata::ReadWriteImage ("rdwrimage")
constexpr StringLiteral NVVMMetadata::Managed ("managed")
static void cacheAnnotationFromMD (const MDNode *MetadataNode, AnnotationValues &RetVal)
static void cacheAnnotationFromMD (const Module *M, const GlobalValue *GV)
static std::optional< unsignedfindOneNVVMAnnotation (const GlobalValue *GV, StringRef Prop)
static bool findAllNVVMAnnotation (const GlobalValue *GV, StringRef Prop, std::vector< unsigned > &RetVal)
static bool globalHasNVVMAnnotation (const Value &V, StringRef Prop)
static bool argHasNVVMAnnotation (const Value &Val, StringRef Annotation)
static std::optional< unsignedgetFnAttrParsedInt (const Function &F, StringRef Attr)
static SmallVector< unsigned, 3 > getFnAttrParsedVector (const Function &F, StringRef Attr)
static std::optional< uint64_tgetVectorProduct (ArrayRef< unsigned > V)

Function Documentation

◆ argHasNVVMAnnotation()

bool argHasNVVMAnnotation ( const Value & Val,
StringRef Annotation )
static

◆ cacheAnnotationFromMD() [1/2]

◆ cacheAnnotationFromMD() [2/2]

◆ findAllNVVMAnnotation()

bool findAllNVVMAnnotation ( const GlobalValue * GV,
StringRef Prop,
std::vector< unsigned > & RetVal )
static

◆ findOneNVVMAnnotation()

std::optional< unsigned > findOneNVVMAnnotation ( const GlobalValue * GV,
StringRef Prop )
static

◆ getAnnotationCache()

AnnotationCache & getAnnotationCache ( )
static

◆ getFnAttrParsedInt()

std::optional< unsigned > getFnAttrParsedInt ( const Function & F,
StringRef Attr )
static

Definition at line 176 of file NVVMProperties.cpp.

References F.

Referenced by llvm::getMaxClusterRank(), llvm::getMaxNReg(), and llvm::getMinCTASm().

◆ getFnAttrParsedVector()

SmallVector< unsigned, 3 > getFnAttrParsedVector ( const Function & F,
StringRef Attr )
static

◆ getVectorProduct()

std::optional< uint64_t > getVectorProduct ( ArrayRef< unsigned > V)
static

◆ globalHasNVVMAnnotation()

bool globalHasNVVMAnnotation ( const Value & V,
StringRef Prop )
static

Definition at line 156 of file NVVMProperties.cpp.

References assert(), llvm::dyn_cast(), and findOneNVVMAnnotation().

Referenced by llvm::isManaged().