LLVM 20.0.0git
|
#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" |
Variables | |
DEBUG_TYPE | |
DXIL Intrinsic | Expansion |
DXIL Intrinsic | false |
#define DEBUG_TYPE "dxil-intrinsic-expansion" |
Definition at line 30 of file DXILIntrinsicExpansion.cpp.
Definition at line 54 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateSub(), llvm::ElementCount::getFixed(), getNumElements(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::Type::isVectorTy(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 120 of file DXILIntrinsicExpansion.cpp.
References Cond, llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateFCmpUNE(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreateOr(), llvm::ElementCount::getFixed(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), I, llvm::Type::isFloatingPointTy(), llvm::Type::isVectorTy(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 318 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateIntrinsic(), getMaxForClamp(), getMinForClamp(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 100 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::CallBase::getAttributes(), llvm::ElementCount::getFixed(), getNumElements(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::CallInst::isTailCall(), llvm::Type::isVectorTy(), llvm::numbers::log2ef, llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 71 of file DXILIntrinsicExpansion.cpp.
References A, assert(), B, llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateMul(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), I, llvm::Type::isVectorTy(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by expandIntrinsic().
Definition at line 332 of file DXILIntrinsicExpansion.cpp.
References llvm::Instruction::eraseFromParent(), expandAbs(), expandAnyIntrinsic(), expandClampIntrinsic(), expandExpIntrinsic(), expandIntegerDot(), expandLengthIntrinsic(), expandLerpIntrinsic(), expandLog10Intrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), expandPowIntrinsic(), F, and llvm::Value::replaceAllUsesWith().
Referenced by expansionIntrinsics().
Definition at line 153 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateFAdd(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), I, llvm::Type::isVectorTy(), Mul, llvm::report_fatal_error(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 180 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFAdd(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateFSub(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::IRBuilderBase::SetInsertPoint(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 210 of file DXILIntrinsicExpansion.cpp.
References expandLogIntrinsic(), llvm::numbers::ln10f, and llvm::numbers::ln2f.
Referenced by expandIntrinsic().
Definition at line 191 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::CallBase::getAttributes(), llvm::ElementCount::getFixed(), getNumElements(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::ConstantVector::getSplat(), llvm::CallInst::isTailCall(), llvm::Type::isVectorTy(), llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic(), and expandLog10Intrinsic().
Definition at line 214 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFDiv(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::APFloat::isZero(), llvm::report_fatal_error(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 274 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::CallBase::getAttributes(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::CallInst::isTailCall(), Mul, llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 380 of file DXILIntrinsicExpansion.cpp.
References expandIntrinsic(), F, isIntrinsicExpansion(), and llvm::make_early_inc_range().
Referenced by llvm::DXILIntrinsicExpansion::run(), and llvm::DXILIntrinsicExpansionLegacy::runOnModule().
|
static |
Definition at line 292 of file DXILIntrinsicExpansion.cpp.
References assert(), llvm::Type::getScalarType(), llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::Type::isVectorTy().
Referenced by expandClampIntrinsic().
|
static |
Definition at line 305 of file DXILIntrinsicExpansion.cpp.
References assert(), llvm::Type::getScalarType(), llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::Type::isVectorTy().
Referenced by expandClampIntrinsic().
INITIALIZE_PASS_BEGIN | ( | DXILIntrinsicExpansionLegacy | , |
DEBUG_TYPE | , | ||
"DXIL Intrinsic Expansion" | , | ||
false | , | ||
false | |||
) |
Definition at line 34 of file DXILIntrinsicExpansion.cpp.
References F.
Referenced by expansionIntrinsics().
DEBUG_TYPE |
Definition at line 412 of file DXILIntrinsicExpansion.cpp.
DXIL Intrinsic Expansion |
Definition at line 413 of file DXILIntrinsicExpansion.cpp.
Referenced by llvm::coverage::CoverageMapping::getCoverageForExpansion().
DXIL Intrinsic false |
Definition at line 413 of file DXILIntrinsicExpansion.cpp.