LLVM 20.0.0git
Namespaces | Macros | Functions
SPIRVEmitIntrinsics.cpp File Reference
#include "SPIRV.h"
#include "SPIRVBuiltins.h"
#include "SPIRVMetadata.h"
#include "SPIRVSubtarget.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/IR/TypedPointerType.h"
#include <queue>
#include <unordered_set>
#include "SPIRVGenTables.inc"

Go to the source code of this file.

Namespaces

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

Macros

#define GET_BuiltinGroup_DECL
 

Functions

void llvm::initializeSPIRVEmitIntrinsicsPass (PassRegistry &)
 
 INITIALIZE_PASS (SPIRVEmitIntrinsics, "emit-intrinsics", "SPIRV emit intrinsics", false, false) static inline bool isAssignTypeInstr(const Instruction *I)
 
static bool isMemInstrToReplace (Instruction *I)
 
static bool isAggrConstForceInt32 (const Value *V)
 
static void setInsertPointSkippingPhis (IRBuilder<> &B, Instruction *I)
 
static void setInsertPointAfterDef (IRBuilder<> &B, Instruction *I)
 
static bool requireAssignType (Instruction *I)
 
static void reportFatalOnTokenType (const Instruction *I)
 
static void emitAssignName (Instruction *I, IRBuilder<> &B)
 
static bool IsKernelArgInt8 (Function *F, StoreInst *SI)
 
static TyperestoreMutatedType (SPIRVGlobalRegistry *GR, Instruction *I, Type *Ty)
 
static TypegetPointeeTypeByCallInst (StringRef DemangledName, Function *CalledF, unsigned OpIdx)
 
static TypegetAtomicElemTy (SPIRVGlobalRegistry *GR, Instruction *I, Value *PointerOperand)
 
static void createDecorationIntrinsic (Instruction *I, MDNode *Node, IRBuilder<> &B)
 
static void createRoundingModeDecoration (Instruction *I, unsigned RoundingModeDeco, IRBuilder<> &B)
 
static void createSaturatedConversionDecoration (Instruction *I, IRBuilder<> &B)
 
static FunctionTypegetFunctionPointerElemType (Function *F, SPIRVGlobalRegistry *GR)
 

Macro Definition Documentation

◆ GET_BuiltinGroup_DECL

#define GET_BuiltinGroup_DECL

Definition at line 52 of file SPIRVEmitIntrinsics.cpp.

Function Documentation

◆ createDecorationIntrinsic()

static void createDecorationIntrinsic ( Instruction I,
MDNode Node,
IRBuilder<> &  B 
)
static

◆ createRoundingModeDecoration()

static void createRoundingModeDecoration ( Instruction I,
unsigned  RoundingModeDeco,
IRBuilder<> &  B 
)
static

◆ createSaturatedConversionDecoration()

static void createSaturatedConversionDecoration ( Instruction I,
IRBuilder<> &  B 
)
static

◆ emitAssignName()

static void emitAssignName ( Instruction I,
IRBuilder<> &  B 
)
static

◆ getAtomicElemTy()

static Type * getAtomicElemTy ( SPIRVGlobalRegistry GR,
Instruction I,
Value PointerOperand 
)
inlinestatic

◆ getFunctionPointerElemType()

static FunctionType * getFunctionPointerElemType ( Function F,
SPIRVGlobalRegistry GR 
)
static

◆ getPointeeTypeByCallInst()

static Type * getPointeeTypeByCallInst ( StringRef  DemangledName,
Function CalledF,
unsigned  OpIdx 
)
static

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( SPIRVEmitIntrinsics  ,
"emit-intrinsics"  ,
"SPIRV emit intrinsics"  ,
false  ,
false   
) const

Definition at line 286 of file SPIRVEmitIntrinsics.cpp.

References I.

◆ isAggrConstForceInt32()

static bool isAggrConstForceInt32 ( const Value V)
static

Definition at line 299 of file SPIRVEmitIntrinsics.cpp.

◆ IsKernelArgInt8()

static bool IsKernelArgInt8 ( Function F,
StoreInst SI 
)
static

Definition at line 377 of file SPIRVEmitIntrinsics.cpp.

References F, llvm::isPointerTy(), and llvm::CallingConv::SPIR_KERNEL.

◆ isMemInstrToReplace()

static bool isMemInstrToReplace ( Instruction I)
static

Definition at line 294 of file SPIRVEmitIntrinsics.cpp.

References I.

◆ reportFatalOnTokenType()

static void reportFatalOnTokenType ( const Instruction I)
inlinestatic

Definition at line 332 of file SPIRVEmitIntrinsics.cpp.

References I, and llvm::report_fatal_error().

Referenced by emitAssignName().

◆ requireAssignType()

static bool requireAssignType ( Instruction I)
static

Definition at line 320 of file SPIRVEmitIntrinsics.cpp.

References I, and Intr.

◆ restoreMutatedType()

static Type * restoreMutatedType ( SPIRVGlobalRegistry GR,
Instruction I,
Type Ty 
)
inlinestatic

◆ setInsertPointAfterDef()

static void setInsertPointAfterDef ( IRBuilder<> &  B,
Instruction I 
)
static

Definition at line 312 of file SPIRVEmitIntrinsics.cpp.

References B, and I.

Referenced by createDecorationIntrinsic(), and emitAssignName().

◆ setInsertPointSkippingPhis()

static void setInsertPointSkippingPhis ( IRBuilder<> &  B,
Instruction I 
)
static

Definition at line 305 of file SPIRVEmitIntrinsics.cpp.

References B, and I.