|
LLVM 24.0.0git
|
#include "DXILIntrinsicExpansion.h"#include "DirectX.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallVector.h"#include "llvm/CodeGen/Passes.h"#include "llvm/IR/Constants.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/MatrixBuilder.h"#include "llvm/IR/Module.h"#include "llvm/IR/PassManager.h"#include "llvm/IR/Type.h"#include "llvm/Pass.h"#include "llvm/Support/Casting.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" |
Variables | |
| DEBUG_TYPE | |
| DXIL Intrinsic | Expansion |
| DXIL Intrinsic | false |
| #define DEBUG_TYPE "dxil-intrinsic-expansion" |
Definition at line 35 of file DXILIntrinsicExpansion.cpp.
|
static |
Definition at line 275 of file DXILIntrinsicExpansion.cpp.
References A(), assert(), B(), llvm::APInt::getLowBitsSet(), T, and llvm::V1.
Referenced by expandMulWithOverflow().
Definition at line 138 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::ElementCount::getFixed(), llvm::Type::getInt16Ty(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::Value::getType(), llvm::Type::isHalfTy(), and llvm::Type::isVectorTy().
Referenced by expandIsFPClass().
Definition at line 57 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::ElementCount::getFixed(), llvm::Type::getInt16Ty(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::Value::getType(), llvm::Type::isHalfTy(), and llvm::Type::isVectorTy().
Referenced by expandIntrinsic(), and expandIsFPClass().
Definition at line 92 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::ElementCount::getFixed(), llvm::Type::getInt16Ty(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::Value::getType(), llvm::Type::isHalfTy(), and llvm::Type::isVectorTy().
Referenced by expandIntrinsic(), and expandIsFPClass().
Definition at line 165 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::ElementCount::getFixed(), llvm::Type::getInt16Ty(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::Value::getType(), llvm::Type::isHalfTy(), and llvm::Type::isVectorTy().
Referenced by expandIsFPClass().
Definition at line 396 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 605 of file DXILIntrinsicExpansion.cpp.
References assert(), Cond, llvm::dyn_cast(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), I, llvm::Type::isFloatingPointTy(), and X.
Referenced by expandIntrinsic().
Definition at line 715 of file DXILIntrinsicExpansion.cpp.
References llvm::CallBase::getAttributes(), llvm::Instruction::getFastMathFlags(), llvm::User::getOperand(), llvm::CallInst::isTailCall(), llvm::numbers::pi, llvm::CallBase::setAttributes(), llvm::CallInst::setTailCall(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 883 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().
Definition at line 994 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::Type::getInt32Ty(), llvm::User::getOperand(), llvm::FunctionType::getParamType(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), I, llvm::Type::isDoubleTy(), and llvm::Type::isIntegerTy().
Referenced by expandIntrinsic().
|
static |
Definition at line 1112 of file DXILIntrinsicExpansion.cpp.
References getMaxForClamp(), getMinForClamp(), llvm::User::getOperand(), and X.
Referenced by expandIntrinsic().
Definition at line 412 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::PoisonValue::get(), llvm::Value::getName(), llvm::User::getOperand(), llvm::Value::getType(), and llvm::reportFatalUsageError().
Referenced by expandIntrinsic().
Definition at line 1125 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), llvm::numbers::inv_pi, and X.
Referenced by expandIntrinsic().
Definition at line 530 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::CallBase::getAttributes(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::CallInst::isTailCall(), llvm::numbers::log2ef, llvm::CallBase::setAttributes(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic().
Definition at line 491 of file DXILIntrinsicExpansion.cpp.
References expandFloatDotIntrinsic(), and llvm::User::getOperand().
Definition at line 450 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().
Definition at line 764 of file DXILIntrinsicExpansion.cpp.
References A(), assert(), B(), llvm::BitWidth, llvm::User::getOperand(), llvm::Value::getType(), and llvm::isPowerOf2_32().
Referenced by expandIntrinsic().
|
static |
Definition at line 497 of file DXILIntrinsicExpansion.cpp.
References A(), assert(), B(), llvm::dyn_cast(), llvm::User::getOperand(), llvm::Type::getScalarType(), I, llvm::Type::isIntegerTy(), and llvm::Type::isVectorTy().
Referenced by expandIntrinsic().
|
static |
Definition at line 870 of file DXILIntrinsicExpansion.cpp.
References llvm::CallBase::getArgOperand(), and llvm::Monotonic.
Referenced by expandIntrinsic().
Definition at line 1266 of file DXILIntrinsicExpansion.cpp.
References llvm::AtomicRMWInst::Add, llvm::Instruction::eraseFromParent(), expand16BitIsInf(), expand16BitIsNaN(), expandAbs(), expandAnyOrAllIntrinsic(), expandAtan2Intrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandClampIntrinsic(), expandCrossIntrinsic(), expandDegreesIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandFunnelShiftIntrinsic(), expandIntegerDotIntrinsic(), expandInterlockedIntrinsic(), expandIsFPClass(), expandLerpIntrinsic(), expandLog10Intrinsic(), expandLogIntrinsic(), expandMatrixMultiply(), expandMatrixTranspose(), expandMulWithOverflow(), expandNormalizeIntrinsic(), expandPowIntrinsic(), expandRadiansIntrinsic(), expandSignIntrinsic(), expandStepIntrinsic(), expandUsubSat(), expandVecReduceAdd(), F, llvm::AtomicRMWInst::Or, and llvm::Value::replaceAllUsesWith().
Referenced by expansionIntrinsics().
Definition at line 549 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().
Definition at line 646 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 674 of file DXILIntrinsicExpansion.cpp.
References expandLogIntrinsic(), llvm::numbers::ln10f, and llvm::numbers::ln2f.
Referenced by expandIntrinsic().
Definition at line 656 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::CallBase::getAttributes(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::CallInst::isTailCall(), llvm::numbers::ln2f, llvm::CallBase::setAttributes(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic(), and expandLog10Intrinsic().
Definition at line 1163 of file DXILIntrinsicExpansion.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, llvm::cast(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::PoisonValue::get(), llvm::CallBase::getArgOperand(), llvm::Value::getType(), I, llvm::Type::isDoubleTy(), llvm::Type::isFloatingPointTy(), LHS, llvm::Intrinsic::not_intrinsic, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::reportFatalUsageError(), and RHS.
Referenced by expandIntrinsic().
Definition at line 1252 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::CallBase::getArgOperand(), and I.
Referenced by expandIntrinsic().
Definition at line 300 of file DXILIntrinsicExpansion.cpp.
References A(), B(), createMulHighUnsigned(), llvm::PoisonValue::get(), llvm::StructType::get(), llvm::CallBase::getArgOperand(), llvm::Value::getType(), llvm::Type::getWithNewBitWidth(), llvm::Hi, llvm::Lo, Mul, and Signed.
Referenced by expandIntrinsic().
Definition at line 680 of file DXILIntrinsicExpansion.cpp.
References llvm::dyn_cast(), expandFloatDotIntrinsic(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::APFloat::isZero(), llvm::reportFatalUsageError(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 820 of file DXILIntrinsicExpansion.cpp.
References llvm::CallBase::getAttributes(), llvm::User::getOperand(), llvm::CallInst::isTailCall(), Mul, llvm::CallBase::setAttributes(), llvm::CallInst::setTailCall(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 862 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), llvm::numbers::pi, and X.
Referenced by expandIntrinsic().
Definition at line 1133 of file DXILIntrinsicExpansion.cpp.
References assert(), llvm::Constant::getNullValue(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and X.
Referenced by expandIntrinsic().
Definition at line 840 of file DXILIntrinsicExpansion.cpp.
References Cond, llvm::dyn_cast(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::ConstantVector::getSplat(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 259 of file DXILIntrinsicExpansion.cpp.
References A(), B(), llvm::CallBase::getArgOperand(), and llvm::Sub.
Referenced by expandIntrinsic().
|
static |
Definition at line 364 of file DXILIntrinsicExpansion.cpp.
References assert(), llvm::dyn_cast(), llvm::User::getOperand(), I, llvm::Constant::isNullValue(), and X.
Referenced by expandIntrinsic().
Definition at line 1393 of file DXILIntrinsicExpansion.cpp.
References llvm::dyn_cast(), expandIntrinsic(), F, isIntrinsicExpansion(), and llvm::make_early_inc_range().
Referenced by llvm::DXILIntrinsicExpansion::run(), and DXILIntrinsicExpansionLegacy::runOnModule().
|
static |
Definition at line 1094 of file DXILIntrinsicExpansion.cpp.
References assert().
Referenced by expandClampIntrinsic().
|
static |
Definition at line 1103 of file DXILIntrinsicExpansion.cpp.
References assert().
Referenced by expandClampIntrinsic().
| INITIALIZE_PASS_BEGIN | ( | DXILIntrinsicExpansionLegacy | , |
| DEBUG_TYPE | , | ||
| "DXIL Intrinsic Expansion" | , | ||
| false | , | ||
| false | ) |
References DEBUG_TYPE.
Definition at line 201 of file DXILIntrinsicExpansion.cpp.
References F, and resourceAccessNeeds64BitExpansion().
Referenced by expansionIntrinsics().
Definition at line 48 of file DXILIntrinsicExpansion.cpp.
References llvm::Type::getScalarType(), llvm::Type::isDoubleTy(), and llvm::Type::isIntegerTy().
Referenced by isIntrinsicExpansion().
| DEBUG_TYPE |
Definition at line 1425 of file DXILIntrinsicExpansion.cpp.
| DXIL Intrinsic Expansion |
Definition at line 1426 of file DXILIntrinsicExpansion.cpp.
Referenced by llvm::coverage::CoverageMapping::getCoverageForExpansion(), and llvm::coverage::CovMapFunctionRecordV1< IntPtrT >::getCoverageMapping().
| DXIL Intrinsic false |
Definition at line 1426 of file DXILIntrinsicExpansion.cpp.