LLVM  8.0.1
AMDGPUIntrinsicInfo.h
Go to the documentation of this file.
1 //===- AMDGPUIntrinsicInfo.h - AMDGPU Intrinsic Information ------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //==-----------------------------------------------------------------------===//
9 //
10 /// \file
11 /// Interface for the AMDGPU Implementation of the Intrinsic Info class.
12 //
13 //===-----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINTRINSICINFO_H
15 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUINTRINSICINFO_H
16 
17 #include "llvm/IR/Intrinsics.h"
19 
20 namespace llvm {
21 class TargetMachine;
22 
23 namespace SIIntrinsic {
24 enum ID {
26 #define GET_INTRINSIC_ENUM_VALUES
27 #include "AMDGPUGenIntrinsicEnums.inc"
28 #undef GET_INTRINSIC_ENUM_VALUES
30 };
31 
32 } // end namespace AMDGPUIntrinsic
33 
35 public:
37 
38  StringRef getName(unsigned IntrId, ArrayRef<Type *> Tys = None) const;
39 
40  std::string getName(unsigned IntrId, Type **Tys = nullptr,
41  unsigned NumTys = 0) const override;
42 
43  unsigned lookupName(const char *Name, unsigned Len) const override;
44  bool isOverloaded(unsigned IID) const override;
45  Function *getDeclaration(Module *M, unsigned ID,
46  Type **Tys = nullptr,
47  unsigned NumTys = 0) const override;
48 
49  Function *getDeclaration(Module *M, unsigned ID,
50  ArrayRef<Type *> = None) const;
51 
52  FunctionType *getType(LLVMContext &Context, unsigned ID,
53  ArrayRef<Type*> Tys = None) const;
54 };
55 
56 } // end namespace llvm
57 
58 #endif
const NoneType None
Definition: None.h:24
LLVMContext & Context
This class represents lattice values for constants.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
bool isOverloaded(ID id)
Returns true if the intrinsic can be overloaded.
Definition: Function.cpp:997
amdgpu Simplify well known AMD library false Value Value const Twine & Name
static StringRef getName(Value *V)
Class to represent function types.
Definition: DerivedTypes.h:103
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
Function * getDeclaration(Module *M, ID id, ArrayRef< Type *> Tys=None)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
Definition: Function.cpp:1020
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:69
static wasm::ValType getType(const TargetRegisterClass *RC)
TargetIntrinsicInfo - Interface to description of machine instruction set.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49