LLVM 20.0.0git
Classes | 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/InstrTypes.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.

Classes

class  DXILIntrinsicExpansionLegacy
 

Macros

#define DEBUG_TYPE   "dxil-intrinsic-expansion"
 

Functions

static bool isIntrinsicExpansion (Function &F)
 
static ValueexpandVecReduceAdd (CallInst *Orig, Intrinsic::ID IntrinsicId)
 
static ValueexpandAbs (CallInst *Orig)
 
static ValueexpandCrossIntrinsic (CallInst *Orig)
 
static ValueexpandFloatDotIntrinsic (CallInst *Orig, Value *A, Value *B)
 
static ValueexpandFloatDotIntrinsic (CallInst *Orig)
 
static ValueexpandIntegerDotIntrinsic (CallInst *Orig, Intrinsic::ID DotIntrinsic)
 
static ValueexpandExpIntrinsic (CallInst *Orig)
 
static ValueexpandAnyOrAllIntrinsic (CallInst *Orig, Intrinsic::ID intrinsicId)
 
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 ValueexpandAtan2Intrinsic (CallInst *Orig)
 
static ValueexpandPowIntrinsic (CallInst *Orig)
 
static ValueexpandStepIntrinsic (CallInst *Orig)
 
static ValueexpandRadiansIntrinsic (CallInst *Orig)
 
static Intrinsic::ID getMaxForClamp (Intrinsic::ID ClampIntrinsic)
 
static Intrinsic::ID getMinForClamp (Intrinsic::ID ClampIntrinsic)
 
static ValueexpandClampIntrinsic (CallInst *Orig, Intrinsic::ID ClampIntrinsic)
 
static ValueexpandDegreesIntrinsic (CallInst *Orig)
 
static ValueexpandSignIntrinsic (CallInst *Orig)
 
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 31 of file DXILIntrinsicExpansion.cpp.

Function Documentation

◆ expandAbs()

static Value * expandAbs ( CallInst Orig)
static

◆ expandAnyOrAllIntrinsic()

static Value * expandAnyOrAllIntrinsic ( CallInst Orig,
Intrinsic::ID  intrinsicId 
)
static

◆ expandAtan2Intrinsic()

static Value * expandAtan2Intrinsic ( CallInst Orig)
static

◆ expandClampIntrinsic()

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

◆ expandCrossIntrinsic()

static Value * expandCrossIntrinsic ( CallInst Orig)
static

◆ expandDegreesIntrinsic()

static Value * expandDegreesIntrinsic ( CallInst Orig)
static

◆ expandExpIntrinsic()

static Value * expandExpIntrinsic ( CallInst Orig)
static

◆ expandFloatDotIntrinsic() [1/2]

static Value * expandFloatDotIntrinsic ( CallInst Orig)
static

◆ expandFloatDotIntrinsic() [2/2]

static Value * expandFloatDotIntrinsic ( CallInst Orig,
Value A,
Value B 
)
static

◆ expandIntegerDotIntrinsic()

static Value * expandIntegerDotIntrinsic ( 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

◆ expandRadiansIntrinsic()

static Value * expandRadiansIntrinsic ( CallInst Orig)
static

◆ expandSignIntrinsic()

static Value * expandSignIntrinsic ( CallInst Orig)
static

◆ expandStepIntrinsic()

static Value * expandStepIntrinsic ( CallInst Orig)
static

◆ expandVecReduceAdd()

static Value * expandVecReduceAdd ( CallInst Orig,
Intrinsic::ID  IntrinsicId 
)
static

◆ expansionIntrinsics()

static bool expansionIntrinsics ( Module M)
static

◆ getMaxForClamp()

static Intrinsic::ID getMaxForClamp ( Intrinsic::ID  ClampIntrinsic)
static

Definition at line 487 of file DXILIntrinsicExpansion.cpp.

References assert().

Referenced by expandClampIntrinsic().

◆ getMinForClamp()

static Intrinsic::ID getMinForClamp ( Intrinsic::ID  ClampIntrinsic)
static

Definition at line 496 of file DXILIntrinsicExpansion.cpp.

References assert().

Referenced by expandClampIntrinsic().

◆ INITIALIZE_PASS_BEGIN()

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

◆ isIntrinsicExpansion()

static bool isIntrinsicExpansion ( Function F)
static

Definition at line 44 of file DXILIntrinsicExpansion.cpp.

References F.

Referenced by expansionIntrinsics().

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 659 of file DXILIntrinsicExpansion.cpp.

◆ Expansion

DXIL Intrinsic Expansion

◆ false

DXIL Intrinsic false

Definition at line 660 of file DXILIntrinsicExpansion.cpp.