LLVM: lib/Target/DirectX/DXILDataScalarization.cpp File Reference (original) (raw)

Go to the source code of this file.

Macros
#define DEBUG_TYPE "dxil-data-scalarization"
Functions
static bool findAndReplaceVectors (llvm::Module &M)
static bool isVectorOrArrayOfVectors (Type *T)
static Type * equivalentArrayTypeFromVector (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 Constant * transformInitializer (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

DEBUG_TYPE

#define DEBUG_TYPE "dxil-data-scalarization"

dynamicallyLoadArray()

equivalentArrayTypeFromVector()

Type * equivalentArrayTypeFromVector ( Type * T) static

findAndReplaceVectors()

INITIALIZE_PASS_BEGIN()

isVectorOrArrayOfVectors()

bool isVectorOrArrayOfVectors ( Type * T) static

transformInitializer()

Definition at line 353 of file DXILDataScalarization.cpp.

References assert(), llvm::cast(), llvm::dyn_cast(), llvm::ConstantAggregateZero::get(), llvm::ConstantArray::get(), llvm::UndefValue::get(), I, llvm::isa(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and transformInitializer().

Referenced by DataScalarizerVisitor::findAndReplaceVectors, flattenGlobalArrays(), and transformInitializer().

DEBUG_TYPE

false

MaxVecSize

Scalarization