LLVM 22.0.0git
Macros | Functions | Variables
DXILLegalizePass.cpp File Reference
#include "DXILLegalizePass.h"
#include "DirectX.h"
#include "llvm/ADT/APInt.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <functional>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "dxil-legalize"
 

Functions

static bool legalizeFreeze (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * >)
 
static bool fixI8UseChain (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool upcastI8AllocasAndUses (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool downcastI64toI32InsertExtractElements (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &)
 
static void emitMemcpyExpansion (IRBuilder<> &Builder, Value *Dst, Value *Src, ConstantInt *Length)
 
static void emitMemsetExpansion (IRBuilder<> &Builder, Value *Dst, Value *Val, ConstantInt *SizeCI, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool legalizeMemCpy (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool legalizeMemSet (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool updateFnegToFsub (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &)
 
static bool legalizeGetHighLowi64Bytes (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &ReplacedValues)
 
static bool legalizeScalarLoadStoreOnArrays (Instruction &I, SmallVectorImpl< Instruction * > &ToRemove, DenseMap< Value *, Value * > &)
 
 INITIALIZE_PASS_BEGIN (DXILLegalizeLegacy, DEBUG_TYPE, "DXIL Legalizer", false, false) INITIALIZE_PASS_END(DXILLegalizeLegacy
 

Variables

 DEBUG_TYPE
 
DXIL Legalizer
 
DXIL false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dxil-legalize"

Definition at line 23 of file DXILLegalizePass.cpp.

Function Documentation

◆ downcastI64toI32InsertExtractElements()

static bool downcastI64toI32InsertExtractElements ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &   
)
static

◆ emitMemcpyExpansion()

static void emitMemcpyExpansion ( IRBuilder<> &  Builder,
Value Dst,
Value Src,
ConstantInt Length 
)
static

◆ emitMemsetExpansion()

static void emitMemsetExpansion ( IRBuilder<> &  Builder,
Value Dst,
Value Val,
ConstantInt SizeCI,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ fixI8UseChain()

static bool fixI8UseChain ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILLegalizeLegacy  ,
DEBUG_TYPE  ,
"DXIL Legalizer"  ,
false  ,
false   
)

◆ legalizeFreeze()

static bool legalizeFreeze ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * >   
)
static

Definition at line 27 of file DXILLegalizePass.cpp.

References I, and ToRemove.

◆ legalizeGetHighLowi64Bytes()

static bool legalizeGetHighLowi64Bytes ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ legalizeMemCpy()

static bool legalizeMemCpy ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ legalizeMemSet()

static bool legalizeMemSet ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ legalizeScalarLoadStoreOnArrays()

static bool legalizeScalarLoadStoreOnArrays ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &   
)
static

◆ upcastI8AllocasAndUses()

static bool upcastI8AllocasAndUses ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &  ReplacedValues 
)
static

◆ updateFnegToFsub()

static bool updateFnegToFsub ( Instruction I,
SmallVectorImpl< Instruction * > &  ToRemove,
DenseMap< Value *, Value * > &   
)
static

Definition at line 511 of file DXILLegalizePass.cpp.

References llvm::IRBuilderBase::CreateFSub(), I, and ToRemove.

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 706 of file DXILLegalizePass.cpp.

◆ false

DXIL false

Definition at line 706 of file DXILLegalizePass.cpp.

◆ Legalizer

DXIL Legalizer

Definition at line 706 of file DXILLegalizePass.cpp.