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::Instruction::eraseFromParent(), 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::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 127 of file DXILIntrinsicExpansion.cpp.
References Cond, llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateFCmpUNE(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreateOr(), llvm::Instruction::eraseFromParent(), 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::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 348 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateIntrinsic(), llvm::Instruction::eraseFromParent(), getMaxForClamp(), getMinForClamp(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 105 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::Instruction::eraseFromParent(), 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::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic().
|
static |
Definition at line 74 of file DXILIntrinsicExpansion.cpp.
References A, assert(), B, llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateMul(), llvm::Instruction::eraseFromParent(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), I, llvm::Type::isVectorTy(), llvm::Value::replaceAllUsesWith(), and llvm::IRBuilderBase::SetInsertPoint().
Referenced by expandIntrinsic().
Definition at line 366 of file DXILIntrinsicExpansion.cpp.
References expandAbs(), expandAnyIntrinsic(), expandClampIntrinsic(), expandExpIntrinsic(), expandIntegerDot(), expandLengthIntrinsic(), expandLerpIntrinsic(), expandLog10Intrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), expandPowIntrinsic(), and F.
Referenced by expansionIntrinsics().
Definition at line 162 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateFAdd(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::Instruction::eraseFromParent(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), I, llvm::Type::isVectorTy(), Mul, llvm::Value::replaceAllUsesWith(), llvm::report_fatal_error(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 193 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFAdd(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateFSub(), llvm::Instruction::eraseFromParent(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 229 of file DXILIntrinsicExpansion.cpp.
References expandLogIntrinsic(), llvm::numbers::ln10f, and llvm::numbers::ln2f.
Referenced by expandIntrinsic().
Definition at line 207 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::Instruction::eraseFromParent(), 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::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), and X.
Referenced by expandIntrinsic(), and expandLog10Intrinsic().
Definition at line 233 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateFDiv(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::Instruction::eraseFromParent(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::APFloat::isZero(), llvm::Value::replaceAllUsesWith(), llvm::report_fatal_error(), llvm::IRBuilderBase::SetInsertPoint(), and X.
Referenced by expandIntrinsic().
Definition at line 302 of file DXILIntrinsicExpansion.cpp.
References llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateIntrinsic(), llvm::Instruction::eraseFromParent(), llvm::CallBase::getAttributes(), llvm::User::getOperand(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::CallInst::isTailCall(), Mul, llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetInsertPoint(), llvm::CallInst::setTailCall(), X, and Y.
Referenced by expandIntrinsic().
Definition at line 396 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 322 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 335 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 428 of file DXILIntrinsicExpansion.cpp.
DXIL Intrinsic Expansion |
Definition at line 429 of file DXILIntrinsicExpansion.cpp.
Referenced by llvm::coverage::CoverageMapping::getCoverageForExpansion().
DXIL Intrinsic false |
Definition at line 429 of file DXILIntrinsicExpansion.cpp.