|
LLVM 22.0.0git
|
#include "DXILDataScalarization.h"#include "DirectX.h"#include "llvm/ADT/PostOrderIterator.h"#include "llvm/ADT/STLExtras.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/GlobalVariable.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/InstVisitor.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"#include "llvm/IR/Operator.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/ReplaceConstant.h"#include "llvm/IR/Type.h"#include "llvm/Support/Casting.h"#include "llvm/Transforms/Utils/Cloning.h"#include "llvm/Transforms/Utils/Local.h"Go to the source code of this file.
Classes | |
| class | DXILDataScalarizationLegacy |
| class | DataScalarizerVisitor |
Macros | |
| #define | DEBUG_TYPE "dxil-data-scalarization" |
Functions | |
| static Type * | equivalentArrayTypeFromVector (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 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 |
| #define DEBUG_TYPE "dxil-data-scalarization" |
Definition at line 27 of file DXILDataScalarization.cpp.
|
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().
Definition at line 33 of file DXILDataScalarization.cpp.
References llvm::dyn_cast(), equivalentArrayTypeFromVector(), llvm::ArrayType::get(), and T.
Referenced by equivalentArrayTypeFromVector(), DataScalarizerVisitor::findAndReplaceVectors, and DataScalarizerVisitor::visitAllocaInst().
|
static |
Definition at line 404 of file DXILDataScalarization.cpp.
Referenced by llvm::DXILDataScalarization::run(), and DXILDataScalarizationLegacy::runOnModule().
| INITIALIZE_PASS_BEGIN | ( | DXILDataScalarizationLegacy | , |
| DEBUG_TYPE | , | ||
| "DXIL Data Scalarization" | , | ||
| false | , | ||
| false | ) |
References DEBUG_TYPE.
Definition at line 121 of file DXILDataScalarization.cpp.
References llvm::dyn_cast(), llvm::isa(), isVectorOrArrayOfVectors(), and T.
Referenced by isVectorOrArrayOfVectors(), and DataScalarizerVisitor::visitAllocaInst().
|
static |
Definition at line 352 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 |
Definition at line 471 of file DXILDataScalarization.cpp.
| DXIL Data false |
Definition at line 472 of file DXILDataScalarization.cpp.
|
static |
Definition at line 28 of file DXILDataScalarization.cpp.
Referenced by llvm::WebAssemblyTTIImpl::getInterleavedMemoryOpCost().
| DXIL Data Scalarization |
Definition at line 472 of file DXILDataScalarization.cpp.