LLVM: lib/Target/DirectX/DXILIntrinsicExpansion.cpp File Reference (original) (raw)

Go to the source code of this file.

Macros
#define DEBUG_TYPE "dxil-intrinsic-expansion"
Functions
static bool resourceAccessNeeds64BitExpansion (Module *M, Type *OverloadTy, bool IsRaw)
static Value * expand16BitIsInf (CallInst *Orig)
static Value * expand16BitIsNaN (CallInst *Orig)
static Value * expand16BitIsFinite (CallInst *Orig)
static Value * expand16BitIsNormal (CallInst *Orig)
static bool isIntrinsicExpansion (Function &F)
static Value * expandUsubSat (CallInst *Orig)
static Value * expandVecReduceAdd (CallInst *Orig, Intrinsic::ID IntrinsicId)
static Value * expandAbs (CallInst *Orig)
static Value * expandCrossIntrinsic (CallInst *Orig)
static Value * expandFloatDotIntrinsic (CallInst *Orig, Value *A, Value *B)
static Value * expandFloatDotIntrinsic (CallInst *Orig)
static Value * expandIntegerDotIntrinsic (CallInst *Orig, Intrinsic::ID DotIntrinsic)
static Value * expandExpIntrinsic (CallInst *Orig)
static Value * expandIsFPClass (CallInst *Orig)
static Value * expandAnyOrAllIntrinsic (CallInst *Orig, Intrinsic::ID IntrinsicId)
static Value * expandLerpIntrinsic (CallInst *Orig)
static Value * expandLogIntrinsic (CallInst *Orig, float LogConstVal=numbers::ln2f)
static Value * expandLog10Intrinsic (CallInst *Orig)
static Value * expandNormalizeIntrinsic (CallInst *Orig)
static Value * expandAtan2Intrinsic (CallInst *Orig)
static Value * expandPowIntrinsic (CallInst *Orig, Intrinsic::ID IntrinsicId)
static Value * expandStepIntrinsic (CallInst *Orig)
static Value * expandRadiansIntrinsic (CallInst *Orig)
static bool expandBufferLoadIntrinsic (CallInst *Orig, bool IsRaw)
static bool expandBufferStoreIntrinsic (CallInst *Orig, bool IsRaw)
static Intrinsic::ID getMaxForClamp (Intrinsic::ID ClampIntrinsic)
static Intrinsic::ID getMinForClamp (Intrinsic::ID ClampIntrinsic)
static Value * expandClampIntrinsic (CallInst *Orig, Intrinsic::ID ClampIntrinsic)
static Value * expandDegreesIntrinsic (CallInst *Orig)
static Value * expandSignIntrinsic (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

DEBUG_TYPE

#define DEBUG_TYPE "dxil-intrinsic-expansion"

expand16BitIsFinite()

expand16BitIsInf()

expand16BitIsNaN()

expand16BitIsNormal()

expandAbs()

expandAnyOrAllIntrinsic()

expandAtan2Intrinsic()

expandBufferLoadIntrinsic()

Definition at line 709 of file DXILIntrinsicExpansion.cpp.

References assert(), llvm::sampleprof::Base, llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::PoisonValue::get(), llvm::StructType::get(), llvm::VectorType::get(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Type::getStructElementType(), llvm::Value::getType(), llvm::Hi, I, llvm::Type::isDoubleTy(), llvm::Type::isIntegerTy(), llvm_unreachable, llvm::Lo, llvm::make_early_inc_range(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ArrayRef< T >::size(), and llvm::Value::users().

Referenced by expandIntrinsic().

expandBufferStoreIntrinsic()

Definition at line 820 of file DXILIntrinsicExpansion.cpp.

References assert(), llvm::sampleprof::Base, llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::PoisonValue::get(), llvm::StructType::get(), llvm::VectorType::get(), llvm::ElementCount::getFixed(), llvm::CallBase::getFunctionType(), llvm::User::getOperand(), llvm::FunctionType::getParamType(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), I, llvm::Int32Ty, llvm::Type::isDoubleTy(), and llvm::Type::isIntegerTy().

Referenced by expandIntrinsic().

expandClampIntrinsic()

expandCrossIntrinsic()

expandDegreesIntrinsic()

expandExpIntrinsic()

expandFloatDotIntrinsic() [1/2]

expandFloatDotIntrinsic() [2/2]

Definition at line 347 of file DXILIntrinsicExpansion.cpp.

References A(), assert(), B(), llvm::dyn_cast(), llvm::Type::getScalarType(), I, llvm::Type::isFloatingPointTy(), llvm::Type::isVectorTy(), and llvm::reportFatalUsageError().

Referenced by expandFloatDotIntrinsic(), expandIntrinsic(), and expandNormalizeIntrinsic().

expandIntegerDotIntrinsic()

expandIntrinsic()

Definition at line 985 of file DXILIntrinsicExpansion.cpp.

References llvm::Instruction::eraseFromParent(), expand16BitIsInf(), expand16BitIsNaN(), expandAbs(), expandAnyOrAllIntrinsic(), expandAtan2Intrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandClampIntrinsic(), expandCrossIntrinsic(), expandDegreesIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandIntegerDotIntrinsic(), expandIsFPClass(), expandLerpIntrinsic(), expandLog10Intrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), expandPowIntrinsic(), expandRadiansIntrinsic(), expandSignIntrinsic(), expandStepIntrinsic(), expandUsubSat(), expandVecReduceAdd(), F, and llvm::Value::replaceAllUsesWith().

Referenced by expansionIntrinsics().

expandIsFPClass()

Definition at line 446 of file DXILIntrinsicExpansion.cpp.

References llvm::BitWidth, llvm::dyn_cast(), expand16BitIsFinite(), expand16BitIsInf(), expand16BitIsNaN(), expand16BitIsNormal(), F, llvm::fcFinite, llvm::fcInf, llvm::fcNan, llvm::fcNegZero, llvm::fcNormal, llvm::FixedVectorType::get(), llvm::CallBase::getArgOperand(), llvm::Type::getIntNTy(), llvm::Type::getPrimitiveSizeInBits(), llvm::reportFatalUsageError(), and T.

Referenced by expandIntrinsic().

expandLerpIntrinsic()

expandLog10Intrinsic()

expandLogIntrinsic()

Definition at line 552 of file DXILIntrinsicExpansion.cpp.

References llvm::cast(), llvm::CallBase::getAttributes(), llvm::ElementCount::getFixed(), getNumElements(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::CallInst::isTailCall(), llvm:🔢:ln2f, and X.

Referenced by expandIntrinsic(), and expandLog10Intrinsic().

expandNormalizeIntrinsic()

expandPowIntrinsic()

expandRadiansIntrinsic()

expandSignIntrinsic()

expandStepIntrinsic()

expandUsubSat()

expandVecReduceAdd()

expansionIntrinsics()

getMaxForClamp()

getMinForClamp()

INITIALIZE_PASS_BEGIN()

isIntrinsicExpansion()

resourceAccessNeeds64BitExpansion()

bool resourceAccessNeeds64BitExpansion ( Module * M, Type * OverloadTy, bool IsRaw ) static

DEBUG_TYPE

Expansion

false