LLVM  16.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 
18 namespace llvm {
19 class Module;
20 class IRBuilderBase;
21 class CallInst;
22 class Value;
23 class Type;
24 class FunctionType;
25 class Use;
26 
27 namespace dxil {
28 
30 public:
32  CallInst *createDXILOpCall(dxil::OpCode OpCode, Type *OverloadTy,
34  Type *getOverloadTy(dxil::OpCode OpCode, FunctionType *FT,
35  bool NoOpCodeParam);
36  static const char *getOpCodeName(dxil::OpCode DXILOp);
37 
38 private:
39  Module &M;
40  IRBuilderBase &B;
41 };
42 
43 } // namespace dxil
44 } // namespace llvm
45 
46 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
FunctionType
Definition: ItaniumDemangle.h:775
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::dxil::DXILOpBuilder::createDXILOpCall
CallInst * createDXILOpCall(dxil::OpCode OpCode, Type *OverloadTy, llvm::iterator_range< Use * > Args)
Definition: DXILOpBuilder.cpp:260
llvm::dxil::DXILOpBuilder::getOverloadTy
Type * getOverloadTy(dxil::OpCode OpCode, FunctionType *FT, bool NoOpCodeParam)
Definition: DXILOpBuilder.cpp:269
llvm::dxil::DXILOpBuilder
Definition: DXILOpBuilder.h:29
TemplateParamKind::Type
@ Type
DXILConstants.h
iterator_range.h
B
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional ldr LCPI1_0 ldr ldr tst movne lsr ldr LCPI1_1 and r0 bx lr it saves an instruction and a register It might be profitable to cse MOVi16 if there are lots of bit immediates with the same bottom half Robert Muth started working on an alternate jump table implementation that does not put the tables in line in the text This is more like the llvm default jump table implementation This might be useful sometime Several revisions of patches are on the mailing beginning while CMP sets them like a subtract Therefore to be able to use CMN for comparisons other than the Z we ll need additional logic to reverse the conditionals associated with the comparison Perhaps a pseudo instruction for the with a post codegen pass to clean up and handle the condition codes See PR5694 for testcase Given the following on int B
Definition: README.txt:592
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::IRBuilderBase
Common base class shared among various IRBuilders.
Definition: IRBuilder.h:93
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::dxil::DXILOpBuilder::DXILOpBuilder
DXILOpBuilder(Module &M, IRBuilderBase &B)
Definition: DXILOpBuilder.h:31
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::dxil::DXILOpBuilder::getOpCodeName
static const char * getOpCodeName(dxil::OpCode DXILOp)
Definition: DXILOpBuilder.cpp:320
llvm::CallInst
This class represents a function call, abstracting a target machine's calling convention.
Definition: Instructions.h:1474
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:394
llvm::FunctionType
Class to represent function types.
Definition: DerivedTypes.h:103