|
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 272 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 393 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 567 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 677 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 832 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::Load, 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 943 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 1061 of file DXILIntrinsicExpansion.cpp.
References getMaxForClamp(), getMinForClamp(), llvm::User::getOperand(), and X.
Referenced by expandIntrinsic().
Definition at line 1074 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), llvm::numbers::inv_pi, and X.
Referenced by expandIntrinsic().
Definition at line 492 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 453 of file DXILIntrinsicExpansion.cpp.
References expandFloatDotIntrinsic(), and llvm::User::getOperand().
Definition at line 412 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 726 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 459 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().
Definition at line 1215 of file DXILIntrinsicExpansion.cpp.
References llvm::Instruction::eraseFromParent(), expand16BitIsInf(), expand16BitIsNaN(), expandAbs(), expandAnyOrAllIntrinsic(), expandAtan2Intrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandClampIntrinsic(), expandDegreesIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandFunnelShiftIntrinsic(), expandIntegerDotIntrinsic(), expandIsFPClass(), expandLerpIntrinsic(), expandLog10Intrinsic(), expandLogIntrinsic(), expandMatrixMultiply(), expandMatrixTranspose(), expandMulWithOverflow(), expandNormalizeIntrinsic(), expandPowIntrinsic(), expandRadiansIntrinsic(), expandSignIntrinsic(), expandStepIntrinsic(), expandUsubSat(), expandVecReduceAdd(), F, and llvm::Value::replaceAllUsesWith().
Referenced by expansionIntrinsics().
Definition at line 511 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 608 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 636 of file DXILIntrinsicExpansion.cpp.
References expandLogIntrinsic(), llvm::numbers::ln10f, and llvm::numbers::ln2f.
Referenced by expandIntrinsic().
Definition at line 618 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 1112 of file DXILIntrinsicExpansion.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), 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 1201 of file DXILIntrinsicExpansion.cpp.
References llvm::cast(), llvm::CallBase::getArgOperand(), and I.
Referenced by expandIntrinsic().
Definition at line 297 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 642 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 782 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 824 of file DXILIntrinsicExpansion.cpp.
References llvm::User::getOperand(), llvm::numbers::pi, and X.
Referenced by expandIntrinsic().
Definition at line 1082 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 802 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 256 of file DXILIntrinsicExpansion.cpp.
References A(), B(), llvm::CallBase::getArgOperand(), and llvm::Sub.
Referenced by expandIntrinsic().
|
static |
Definition at line 361 of file DXILIntrinsicExpansion.cpp.
References assert(), llvm::dyn_cast(), llvm::User::getOperand(), I, llvm::Constant::isNullValue(), and X.
Referenced by expandIntrinsic().
Definition at line 1333 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 1043 of file DXILIntrinsicExpansion.cpp.
References assert().
Referenced by expandClampIntrinsic().
|
static |
Definition at line 1052 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 1365 of file DXILIntrinsicExpansion.cpp.
| DXIL Intrinsic Expansion |
Definition at line 1366 of file DXILIntrinsicExpansion.cpp.
Referenced by llvm::coverage::CoverageMapping::getCoverageForExpansion(), and llvm::coverage::CovMapFunctionRecordV1< IntPtrT >::getCoverageMapping().
| DXIL Intrinsic false |
Definition at line 1366 of file DXILIntrinsicExpansion.cpp.