LLVM  15.0.0git
Classes | Macros | Enumerations | Functions | Variables
DXILOpLowering.cpp File Reference
#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"
Include dependency graph for DXILOpLowering.cpp:

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
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dxil-op-lower"

Definition at line 26 of file DXILOpLowering.cpp.

◆ DXIL_OP_INTRINSIC_MAP

#define DXIL_OP_INTRINSIC_MAP

◆ DXIL_OP_OPERATION_TABLE

#define DXIL_OP_OPERATION_TABLE

Definition at line 145 of file DXILOpLowering.cpp.

Enumeration Type Documentation

◆ OverloadKind

Enumerator
VOID 
HALF 
FLOAT 
DOUBLE 
I1 
I8 
I16 
I32 
I64 
UserDefineType 
ObjectType 

Definition at line 33 of file DXILOpLowering.cpp.

Function Documentation

◆ constructOverloadName()

static std::string constructOverloadName ( OverloadKind  Kind,
Type Ty,
const OpCodeProperty Prop 
)
static

Definition at line 149 of file DXILOpLowering.cpp.

References DXILOpNamePrefix, llvm::getTypeName(), and VOID.

Referenced by createDXILOpFunction().

◆ createDXILOpFunction()

static FunctionCallee createDXILOpFunction ( DXIL::OpCode  DXILOp,
Function F,
Module M 
)
static

◆ getOverloadKind()

static OverloadKind getOverloadKind ( Type Ty)
static

◆ getOverloadTypeName()

static const char* getOverloadTypeName ( OverloadKind  Kind)
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().

◆ getTypeName()

static std::string getTypeName ( OverloadKind  Kind,
Type Ty 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( DXILOpLoweringLegacy  ,
DEBUG_TYPE  ,
"DXIL Op Lowering ,
false  ,
false   
)

◆ lowerIntrinsic()

static void lowerIntrinsic ( DXIL::OpCode  DXILOp,
Function F,
Module M 
)
static

◆ lowerIntrinsics()

static bool lowerIntrinsics ( Module M)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 260 of file DXILOpLowering.cpp.

◆ DXILOpNamePrefix

constexpr StringLiteral DXILOpNamePrefix = "dx.op."
constexpr

Definition at line 31 of file DXILOpLowering.cpp.

Referenced by constructOverloadName().

◆ false

DXIL Op false

Definition at line 260 of file DXILOpLowering.cpp.

◆ Lowering

DXIL Op Lowering

Definition at line 260 of file DXILOpLowering.cpp.