LLVM 24.0.0git
VerifierNVVM.cpp File Reference

This file contains NVVM-specific IR verification logic. More...

#include "VerifierInternal.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/Support/MathExtras.h"
#include <optional>

Go to the source code of this file.

Macros

#define Check(C, ...)

Functions

static bool isValidSPElemSize (unsigned ElemSize)
static bool isValidSPIdxSize (unsigned IdxSize)
static bool isValidSPRepeatFactor (unsigned RepeatFactor)
static bool isValidSPDecompressFactor (unsigned NumSrc, unsigned NumTgt)
static std::optional< SPOperandLayout > getSPCompressLayout (unsigned ElemSize, unsigned IdxSize, unsigned RepeatFactor)
static std::optional< SPOperandLayout > getSPDecompressLayout (unsigned NumSrc, unsigned NumTgt, unsigned ElemSize, unsigned IdxSize, unsigned RepeatFactor)
static std::optional< SPVectorInfo > getSPVectorInfo (Type *Ty)
static std::optional< unsigned > getSPMetadataRegisters (Type *Ty)
static void verifySPCompress (VerifierSupport &VS, CallBase &Call)
static void verifySPDecompress (VerifierSupport &VS, CallBase &Call)

Variables

constexpr unsigned MaxSPOperandRegisters = 253

Detailed Description

This file contains NVVM-specific IR verification logic.

These checks are always compiled and linked as part of LLVMCore.

Definition in file VerifierNVVM.cpp.

Macro Definition Documentation

◆ Check

#define Check ( C,
... )
Value:
do { \
if (!(C)) { \
VS.CheckFailed(__VA_ARGS__); \
return; \
} \
} while (false)
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")

Definition at line 24 of file VerifierNVVM.cpp.

Referenced by verifySPCompress(), and verifySPDecompress().

Function Documentation

◆ getSPCompressLayout()

std::optional< SPOperandLayout > getSPCompressLayout ( unsigned ElemSize,
unsigned IdxSize,
unsigned RepeatFactor )
static

◆ getSPDecompressLayout()

std::optional< SPOperandLayout > getSPDecompressLayout ( unsigned NumSrc,
unsigned NumTgt,
unsigned ElemSize,
unsigned IdxSize,
unsigned RepeatFactor )
static

◆ getSPMetadataRegisters()

std::optional< unsigned > getSPMetadataRegisters ( Type * Ty)
static

Definition at line 130 of file VerifierNVVM.cpp.

References llvm::dyn_cast().

Referenced by verifySPCompress(), and verifySPDecompress().

◆ getSPVectorInfo()

std::optional< SPVectorInfo > getSPVectorInfo ( Type * Ty)
static

Definition at line 115 of file VerifierNVVM.cpp.

References llvm::divideCeil(), and llvm::dyn_cast().

Referenced by verifySPCompress(), and verifySPDecompress().

◆ isValidSPDecompressFactor()

bool isValidSPDecompressFactor ( unsigned NumSrc,
unsigned NumTgt )
static

Definition at line 65 of file VerifierNVVM.cpp.

Referenced by getSPDecompressLayout().

◆ isValidSPElemSize()

bool isValidSPElemSize ( unsigned ElemSize)
static

Definition at line 53 of file VerifierNVVM.cpp.

Referenced by getSPCompressLayout(), and getSPDecompressLayout().

◆ isValidSPIdxSize()

bool isValidSPIdxSize ( unsigned IdxSize)
static

Definition at line 57 of file VerifierNVVM.cpp.

Referenced by getSPCompressLayout(), and getSPDecompressLayout().

◆ isValidSPRepeatFactor()

bool isValidSPRepeatFactor ( unsigned RepeatFactor)
static

Definition at line 61 of file VerifierNVVM.cpp.

References llvm::isPowerOf2_32().

Referenced by getSPCompressLayout(), and getSPDecompressLayout().

◆ verifySPCompress()

void verifySPCompress ( VerifierSupport & VS,
CallBase & Call )
static

◆ verifySPDecompress()

void verifySPDecompress ( VerifierSupport & VS,
CallBase & Call )
static

Variable Documentation

◆ MaxSPOperandRegisters

unsigned MaxSPOperandRegisters = 253
constexpr

Definition at line 51 of file VerifierNVVM.cpp.

Referenced by getSPCompressLayout(), and getSPDecompressLayout().