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 bool expandAbs (CallInst *Orig)
 
static bool expandIntegerDot (CallInst *Orig, Intrinsic::ID DotIntrinsic)
 
static bool expandExpIntrinsic (CallInst *Orig)
 
static bool expandAnyIntrinsic (CallInst *Orig)
 
static bool expandLengthIntrinsic (CallInst *Orig)
 
static bool expandLerpIntrinsic (CallInst *Orig)
 
static bool expandLogIntrinsic (CallInst *Orig, float LogConstVal=numbers::ln2f)
 
static bool expandLog10Intrinsic (CallInst *Orig)
 
static bool expandNormalizeIntrinsic (CallInst *Orig)
 
static bool expandPowIntrinsic (CallInst *Orig)
 
static Intrinsic::ID getMaxForClamp (Type *ElemTy, Intrinsic::ID ClampIntrinsic)
 
static Intrinsic::ID getMinForClamp (Type *ElemTy, Intrinsic::ID ClampIntrinsic)
 
static bool expandClampIntrinsic (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 bool expandAbs ( CallInst Orig)
static

◆ expandAnyIntrinsic()

static bool expandAnyIntrinsic ( CallInst Orig)
static

◆ expandClampIntrinsic()

static bool expandClampIntrinsic ( CallInst Orig,
Intrinsic::ID  ClampIntrinsic 
)
static

◆ expandExpIntrinsic()

static bool expandExpIntrinsic ( CallInst Orig)
static

◆ expandIntegerDot()

static bool expandIntegerDot ( CallInst Orig,
Intrinsic::ID  DotIntrinsic 
)
static

◆ expandIntrinsic()

static bool expandIntrinsic ( Function F,
CallInst Orig 
)
static

◆ expandLengthIntrinsic()

static bool expandLengthIntrinsic ( CallInst Orig)
static

◆ expandLerpIntrinsic()

static bool expandLerpIntrinsic ( CallInst Orig)
static

◆ expandLog10Intrinsic()

static bool expandLog10Intrinsic ( CallInst Orig)
static

◆ expandLogIntrinsic()

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

◆ expandNormalizeIntrinsic()

static bool expandNormalizeIntrinsic ( CallInst Orig)
static

◆ expandPowIntrinsic()

static bool 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 428 of file DXILIntrinsicExpansion.cpp.

◆ Expansion

DXIL Intrinsic Expansion

◆ false

DXIL Intrinsic false

Definition at line 429 of file DXILIntrinsicExpansion.cpp.