LLVM 20.0.0git
Macros | Functions | Variables
DXILIntrinsicExpansion.cpp File Reference
#include "DXILIntrinsicExpansion.h"
#include "DirectX.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsDirectX.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "dxil-intrinsic-expansion"
 

Functions

static bool isIntrinsicExpansion (Function &F)
 
static ValueexpandAbs (CallInst *Orig)
 
static ValueexpandIntegerDot (CallInst *Orig, Intrinsic::ID DotIntrinsic)
 
static ValueexpandExpIntrinsic (CallInst *Orig)
 
static ValueexpandAnyIntrinsic (CallInst *Orig)
 
static ValueexpandLengthIntrinsic (CallInst *Orig)
 
static ValueexpandLerpIntrinsic (CallInst *Orig)
 
static ValueexpandLogIntrinsic (CallInst *Orig, float LogConstVal=numbers::ln2f)
 
static ValueexpandLog10Intrinsic (CallInst *Orig)
 
static ValueexpandNormalizeIntrinsic (CallInst *Orig)
 
static ValueexpandPowIntrinsic (CallInst *Orig)
 
static Intrinsic::ID getMaxForClamp (Type *ElemTy, Intrinsic::ID ClampIntrinsic)
 
static Intrinsic::ID getMinForClamp (Type *ElemTy, Intrinsic::ID ClampIntrinsic)
 
static ValueexpandClampIntrinsic (CallInst *Orig, Intrinsic::ID ClampIntrinsic)
 
static bool expandIntrinsic (Function &F, CallInst *Orig)
 
static bool expansionIntrinsics (Module &M)
 
 INITIALIZE_PASS_BEGIN (DXILIntrinsicExpansionLegacy, DEBUG_TYPE, "DXIL Intrinsic Expansion", false, false) INITIALIZE_PASS_END(DXILIntrinsicExpansionLegacy
 

Variables

 DEBUG_TYPE
 
DXIL Intrinsic Expansion
 
DXIL Intrinsic false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dxil-intrinsic-expansion"

Definition at line 30 of file DXILIntrinsicExpansion.cpp.

Function Documentation

◆ expandAbs()

static Value * expandAbs ( CallInst Orig)
static

◆ expandAnyIntrinsic()

static Value * expandAnyIntrinsic ( CallInst Orig)
static

◆ expandClampIntrinsic()

static Value * expandClampIntrinsic ( CallInst Orig,
Intrinsic::ID  ClampIntrinsic 
)
static

◆ expandExpIntrinsic()

static Value * expandExpIntrinsic ( CallInst Orig)
static

◆ expandIntegerDot()

static Value * expandIntegerDot ( CallInst Orig,
Intrinsic::ID  DotIntrinsic 
)
static

◆ expandIntrinsic()

static bool expandIntrinsic ( Function F,
CallInst Orig 
)
static

◆ expandLengthIntrinsic()

static Value * expandLengthIntrinsic ( CallInst Orig)
static

◆ expandLerpIntrinsic()

static Value * expandLerpIntrinsic ( CallInst Orig)
static

◆ expandLog10Intrinsic()

static Value * expandLog10Intrinsic ( CallInst Orig)
static

◆ expandLogIntrinsic()

static Value * expandLogIntrinsic ( CallInst Orig,
float  LogConstVal = numbers::ln2f 
)
static

◆ expandNormalizeIntrinsic()

static Value * expandNormalizeIntrinsic ( CallInst Orig)
static

◆ expandPowIntrinsic()

static Value * expandPowIntrinsic ( CallInst Orig)
static

◆ expansionIntrinsics()

static bool expansionIntrinsics ( Module M)
static

◆ getMaxForClamp()

static Intrinsic::ID getMaxForClamp ( Type ElemTy,
Intrinsic::ID  ClampIntrinsic 
)
static

◆ getMinForClamp()

static Intrinsic::ID getMinForClamp ( Type ElemTy,
Intrinsic::ID  ClampIntrinsic 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILIntrinsicExpansionLegacy  ,
DEBUG_TYPE  ,
"DXIL Intrinsic Expansion"  ,
false  ,
false   
)

◆ isIntrinsicExpansion()

static bool isIntrinsicExpansion ( Function F)
static

Definition at line 34 of file DXILIntrinsicExpansion.cpp.

References F.

Referenced by expansionIntrinsics().

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 412 of file DXILIntrinsicExpansion.cpp.

◆ Expansion

DXIL Intrinsic Expansion

◆ false

DXIL Intrinsic false

Definition at line 413 of file DXILIntrinsicExpansion.cpp.