LLVM 22.0.0git
DXILDataScalarization.cpp File Reference

Go to the source code of this file.

Classes

class  DXILDataScalarizationLegacy
class  DataScalarizerVisitor

Macros

#define DEBUG_TYPE   "dxil-data-scalarization"

Functions

static TypeequivalentArrayTypeFromVector (Type *T)
static bool findAndReplaceVectors (llvm::Module &M)
static bool isVectorOrArrayOfVectors (Type *T)
static std::pair< Value *, Value * > dynamicallyLoadArray (IRBuilder<> &Builder, AllocaInst *ArrAlloca, Value *Index, const Twine &Name="")
 Returns a pair of Value* with the first being a GEP into ArrAlloca using indices {0, Index}, and the second Value* being a Load of the GEP.
static ConstanttransformInitializer (Constant *Init, Type *OrigType, Type *NewType, LLVMContext &Ctx)
 INITIALIZE_PASS_BEGIN (DXILDataScalarizationLegacy, DEBUG_TYPE, "DXIL Data Scalarization", false, false) INITIALIZE_PASS_END(DXILDataScalarizationLegacy

Variables

static const int MaxVecSize = 4
 DEBUG_TYPE
DXIL Data Scalarization
DXIL Data false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dxil-data-scalarization"

Definition at line 27 of file DXILDataScalarization.cpp.

Function Documentation

◆ dynamicallyLoadArray()

std::pair< Value *, Value * > dynamicallyLoadArray ( IRBuilder<> & Builder,
AllocaInst * ArrAlloca,
Value * Index,
const Twine & Name = "" )
static

Returns a pair of Value* with the first being a GEP into ArrAlloca using indices {0, Index}, and the second Value* being a Load of the GEP.

Definition at line 223 of file DXILDataScalarization.cpp.

References GEP, llvm::AllocaInst::getAllocatedType(), and llvm::Type::getArrayElementType().

◆ equivalentArrayTypeFromVector()

◆ findAndReplaceVectors()

bool findAndReplaceVectors ( llvm::Module & M)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILDataScalarizationLegacy ,
DEBUG_TYPE ,
"DXIL Data Scalarization" ,
false ,
false  )

References DEBUG_TYPE.

◆ isVectorOrArrayOfVectors()

bool isVectorOrArrayOfVectors ( Type * T)
static

◆ transformInitializer()

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 471 of file DXILDataScalarization.cpp.

◆ false

DXIL Data false

Definition at line 472 of file DXILDataScalarization.cpp.

◆ MaxVecSize

const int MaxVecSize = 4
static

◆ Scalarization

DXIL Data Scalarization

Definition at line 472 of file DXILDataScalarization.cpp.