LLVM 19.0.0git
DXILOpBuilder.h
Go to the documentation of this file.
1//===- DXILOpBuilder.h - Helper class for build DIXLOp functions ----------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file This file contains class to help build DXIL op functions.
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_LIB_TARGET_DIRECTX_DXILOPBUILDER_H
13#define LLVM_LIB_TARGET_DIRECTX_DXILOPBUILDER_H
14
15#include "DXILConstants.h"
17
18namespace llvm {
19class Module;
20class IRBuilderBase;
21class CallInst;
22class Value;
23class Type;
24class FunctionType;
25class Use;
26
27namespace dxil {
28
30public:
31 DXILOpBuilder(Module &M, IRBuilderBase &B) : M(M), B(B) {}
32 /// Create an instruction that calls DXIL Op with return type, specified
33 /// opcode, and call arguments. \param OpCode Opcode of the DXIL Op call
34 /// constructed \param ReturnTy Return type of the DXIL Op call constructed
35 /// \param OverloadTy Overload type of the DXIL Op call constructed
36 /// \return DXIL Op call constructed
37 CallInst *createDXILOpCall(dxil::OpCode OpCode, Type *ReturnTy,
38 Type *OverloadTy, SmallVector<Value *> Args);
39 Type *getOverloadTy(dxil::OpCode OpCode, FunctionType *FT);
40 static const char *getOpCodeName(dxil::OpCode DXILOp);
41
42private:
43 Module &M;
45};
46
47} // namespace dxil
48} // namespace llvm
49
50#endif
RelocType Type
Definition: COFFYAML.cpp:391
Machine Check Debug Module
This file defines the SmallVector class.
This class represents a function call, abstracting a target machine's calling convention.
Class to represent function types.
Definition: DerivedTypes.h:103
Common base class shared among various IRBuilders.
Definition: IRBuilder.h:94
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
DXILOpBuilder(Module &M, IRBuilderBase &B)
Definition: DXILOpBuilder.h:31
Type * getOverloadTy(dxil::OpCode OpCode, FunctionType *FT)
CallInst * createDXILOpCall(dxil::OpCode OpCode, Type *ReturnTy, Type *OverloadTy, SmallVector< Value * > Args)
Create an instruction that calls DXIL Op with return type, specified opcode, and call arguments.
static const char * getOpCodeName(dxil::OpCode DXILOp)
NodeAddr< UseNode * > Use
Definition: RDFGraph.h:385
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18