LLVM 20.0.0git
Namespaces | Functions
SPIRVPrepareFunctions.cpp File Reference
#include "SPIRV.h"
#include "SPIRVSubtarget.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/LowerMemIntrinsics.h"
#include <charconv>
#include <regex>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

void llvm::initializeSPIRVPrepareFunctionsPass (PassRegistry &)
 
 INITIALIZE_PASS (SPIRVPrepareFunctions, "prepare-functions", "SPIRV prepare functions", false, false) std
 
static FunctiongetOrCreateFunction (Module *M, Type *RetTy, ArrayRef< Type * > ArgTypes, StringRef Name)
 
static bool lowerIntrinsicToFunction (IntrinsicInst *Intrinsic)
 
static std::string getAnnotation (Value *AnnoVal, Value *OptAnnoVal)
 
static SmallVector< Metadata * > parseAnnotation (Value *I, const std::string &Anno, LLVMContext &Ctx, Type *Int32Ty)
 
static void lowerPtrAnnotation (IntrinsicInst *II)
 
static void lowerFunnelShifts (IntrinsicInst *FSHIntrinsic)
 
static void buildUMulWithOverflowFunc (Function *UMulFunc)
 
static void lowerExpectAssume (IntrinsicInst *II)
 
static bool toSpvOverloadedIntrinsic (IntrinsicInst *II, Intrinsic::ID NewID, ArrayRef< unsigned > OpNos)
 
static void lowerUMulWithOverflow (IntrinsicInst *UMulIntrinsic)
 

Function Documentation

◆ buildUMulWithOverflowFunc()

static void buildUMulWithOverflowFunc ( Function UMulFunc)
static

◆ getAnnotation()

static std::string getAnnotation ( Value AnnoVal,
Value OptAnnoVal 
)
static

◆ getOrCreateFunction()

static Function * getOrCreateFunction ( Module M,
Type RetTy,
ArrayRef< Type * >  ArgTypes,
StringRef  Name 
)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( SPIRVPrepareFunctions  ,
"prepare-functions"  ,
"SPIRV prepare functions"  ,
false  ,
false   
)

Definition at line 68 of file SPIRVPrepareFunctions.cpp.

References assert(), llvm::Value::getName(), II, and llvm::StringRef::str().

◆ lowerExpectAssume()

static void lowerExpectAssume ( IntrinsicInst II)
static

Definition at line 369 of file SPIRVPrepareFunctions.cpp.

References F, llvm::Intrinsic::getDeclaration(), II, and llvm_unreachable.

◆ lowerFunnelShifts()

static void lowerFunnelShifts ( IntrinsicInst FSHIntrinsic)
static

◆ lowerIntrinsicToFunction()

static bool lowerIntrinsicToFunction ( IntrinsicInst Intrinsic)
static

◆ lowerPtrAnnotation()

static void lowerPtrAnnotation ( IntrinsicInst II)
static

◆ lowerUMulWithOverflow()

static void lowerUMulWithOverflow ( IntrinsicInst UMulIntrinsic)
static

◆ parseAnnotation()

static SmallVector< Metadata * > parseAnnotation ( Value I,
const std::string &  Anno,
LLVMContext Ctx,
Type Int32Ty 
)
static

◆ toSpvOverloadedIntrinsic()

static bool toSpvOverloadedIntrinsic ( IntrinsicInst II,
Intrinsic::ID  NewID,
ArrayRef< unsigned OpNos 
)
static