LLVM
15.0.0git
|
#include "DXILConstants.h"
#include "DirectX.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsDirectX.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/ErrorHandling.h"
#include "DXILOperation.inc"
Go to the source code of this file.
Classes | |
struct | OpCodeProperty |
Macros | |
#define | DEBUG_TYPE "dxil-op-lower" |
#define | DXIL_OP_OPERATION_TABLE |
#define | DXIL_OP_INTRINSIC_MAP |
Enumerations | |
enum | OverloadKind : uint16_t { VOID = 1, HALF = 1 << 1, FLOAT = 1 << 2, DOUBLE = 1 << 3, I1 = 1 << 4, I8 = 1 << 5, I16 = 1 << 6, I32 = 1 << 7, I64 = 1 << 8, UserDefineType = 1 << 9, ObjectType = 1 << 10 } |
Functions | |
static const char * | getOverloadTypeName (OverloadKind Kind) |
static OverloadKind | getOverloadKind (Type *Ty) |
static std::string | getTypeName (OverloadKind Kind, Type *Ty) |
static std::string | constructOverloadName (OverloadKind Kind, Type *Ty, const OpCodeProperty &Prop) |
static FunctionCallee | createDXILOpFunction (DXIL::OpCode DXILOp, Function &F, Module &M) |
static void | lowerIntrinsic (DXIL::OpCode DXILOp, Function &F, Module &M) |
static bool | lowerIntrinsics (Module &M) |
INITIALIZE_PASS_BEGIN (DXILOpLoweringLegacy, DEBUG_TYPE, "DXIL Op Lowering", false, false) INITIALIZE_PASS_END(DXILOpLoweringLegacy | |
Variables | |
constexpr StringLiteral | DXILOpNamePrefix = "dx.op." |
DEBUG_TYPE | |
DXIL Op | Lowering |
DXIL Op | false |
#define DEBUG_TYPE "dxil-op-lower" |
Definition at line 26 of file DXILOpLowering.cpp.
#define DXIL_OP_INTRINSIC_MAP |
#define DXIL_OP_OPERATION_TABLE |
Definition at line 145 of file DXILOpLowering.cpp.
enum OverloadKind : uint16_t |
Enumerator | |
---|---|
VOID | |
HALF | |
FLOAT | |
DOUBLE | |
I1 | |
I8 | |
I16 | |
I32 | |
I64 | |
UserDefineType | |
ObjectType |
Definition at line 33 of file DXILOpLowering.cpp.
|
static |
Definition at line 149 of file DXILOpLowering.cpp.
References DXILOpNamePrefix, llvm::getTypeName(), and VOID.
Referenced by createDXILOpFunction().
|
static |
Definition at line 159 of file DXILOpLowering.cpp.
References llvm::SmallVectorImpl< T >::append(), assert(), constructOverloadName(), llvm::SmallVectorImpl< T >::emplace_back(), F, llvm::FunctionType::get(), llvm::Type::getInt32Ty(), getOverloadKind(), llvm_unreachable, M, OpCodeProperty::OverloadTys, llvm::FunctionType::param_begin(), and llvm::FunctionType::param_end().
Referenced by lowerIntrinsic().
|
static |
Definition at line 74 of file DXILOpLowering.cpp.
References llvm::tgtok::Bits, DOUBLE, llvm::Type::DoubleTyID, FLOAT, llvm::Type::FloatTyID, llvm::IntegerType::getBitWidth(), llvm::Type::getTypeID(), HALF, llvm::Type::HalfTyID, I1, I16, I32, I64, I8, llvm::Type::IntegerTyID, llvm_unreachable, ObjectType, llvm::Type::PointerTyID, llvm::Type::StructTyID, UserDefineType, VOID, and llvm::Type::VoidTyID.
Referenced by createDXILOpFunction().
|
static |
Definition at line 47 of file DXILOpLowering.cpp.
References DOUBLE, FLOAT, HALF, I1, I16, I32, I64, I8, llvm_unreachable, ObjectType, UserDefineType, and VOID.
Referenced by getTypeName().
|
static |
Definition at line 114 of file DXILOpLowering.cpp.
References getOverloadTypeName(), ObjectType, llvm::Type::print(), llvm::ARM_MB::ST, llvm::raw_string_ostream::str(), and UserDefineType.
INITIALIZE_PASS_BEGIN | ( | DXILOpLoweringLegacy | , |
DEBUG_TYPE | , | ||
"DXIL Op Lowering" | , | ||
false | , | ||
false | |||
) |
Definition at line 189 of file DXILOpLowering.cpp.
References llvm::CallBase::arg_begin(), llvm::CallBase::arg_end(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, B, createDXILOpFunction(), llvm::Instruction::eraseFromParent(), F, LLVM_DEBUG, M, llvm::make_early_inc_range(), llvm::Value::replaceAllUsesWith(), and llvm::Value::setName().
Referenced by lowerIntrinsics().
|
static |
Definition at line 211 of file DXILOpLowering.cpp.
References F, lowerIntrinsic(), M, llvm::make_early_inc_range(), and llvm::Intrinsic::not_intrinsic.
DEBUG_TYPE |
Definition at line 260 of file DXILOpLowering.cpp.
|
constexpr |
Definition at line 31 of file DXILOpLowering.cpp.
Referenced by constructOverloadName().
DXIL Op false |
Definition at line 260 of file DXILOpLowering.cpp.
DXIL Op Lowering |
Definition at line 260 of file DXILOpLowering.cpp.