LLVM 20.0.0git
Macros | Functions | Variables
DXILFlattenArrays.cpp File Reference
#include "DXILFlattenArrays.h"
#include "DirectX.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/ReplaceConstant.h"
#include "llvm/Support/Casting.h"
#include "llvm/Transforms/Utils/Local.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "dxil-flatten-arrays"
 

Functions

static void collectElements (Constant *Init, SmallVectorImpl< Constant * > &Elements)
 
static ConstanttransformInitializer (Constant *Init, Type *OrigType, ArrayType *FlattenedType, LLVMContext &Ctx)
 
static void flattenGlobalArrays (Module &M, DenseMap< GlobalVariable *, GlobalVariable * > &GlobalMap)
 
static bool flattenArrays (Module &M)
 
 INITIALIZE_PASS_BEGIN (DXILFlattenArraysLegacy, DEBUG_TYPE, "DXIL Array Flattener", false, false) INITIALIZE_PASS_END(DXILFlattenArraysLegacy
 

Variables

 DEBUG_TYPE
 
DXIL Array Flattener
 
DXIL Array false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dxil-flatten-arrays"

Definition at line 29 of file DXILFlattenArrays.cpp.

Function Documentation

◆ collectElements()

static void collectElements ( Constant Init,
SmallVectorImpl< Constant * > &  Elements 
)
static

◆ flattenArrays()

static bool flattenArrays ( Module M)
static

◆ flattenGlobalArrays()

static void flattenGlobalArrays ( Module M,
DenseMap< GlobalVariable *, GlobalVariable * > &  GlobalMap 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILFlattenArraysLegacy  ,
DEBUG_TYPE  ,
"DXIL Array Flattener"  ,
false  ,
false   
)

◆ transformInitializer()

static Constant * transformInitializer ( Constant Init,
Type OrigType,
ArrayType FlattenedType,
LLVMContext Ctx 
)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 451 of file DXILFlattenArrays.cpp.

◆ false

DXIL Array false

Definition at line 452 of file DXILFlattenArrays.cpp.

◆ Flattener

DXIL Array Flattener

Definition at line 451 of file DXILFlattenArrays.cpp.