LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::AMDGPUIntrinsicInfo Class Referencefinal

#include "Target/AMDGPU/AMDGPUIntrinsicInfo.h"

Inheritance diagram for llvm::AMDGPUIntrinsicInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::AMDGPUIntrinsicInfo:
Collaboration graph
[legend]

Public Member Functions

 AMDGPUIntrinsicInfo ()
 
StringRef getName (unsigned IntrId, ArrayRef< Type *> Tys=None) const
 
std::string getName (unsigned IntrId, Type **Tys=nullptr, unsigned NumTys=0) const override
 Return the name of a target intrinsic, e.g. More...
 
unsigned lookupName (const char *Name, unsigned Len) const override
 Look up target intrinsic by name. More...
 
bool isOverloaded (unsigned IID) const override
 Returns true if the intrinsic can be overloaded. More...
 
FunctiongetDeclaration (Module *M, unsigned ID, Type **Tys=nullptr, unsigned NumTys=0) const override
 Create or insert an LLVM Function declaration for an intrinsic, and return it. More...
 
FunctiongetDeclaration (Module *M, unsigned ID, ArrayRef< Type *>=None) const
 
FunctionTypegetType (LLVMContext &Context, unsigned ID, ArrayRef< Type *> Tys=None) const
 
- Public Member Functions inherited from llvm::TargetIntrinsicInfo
 TargetIntrinsicInfo ()
 
virtual ~TargetIntrinsicInfo ()
 
unsigned lookupName (StringRef Name) const
 
virtual unsigned getIntrinsicID (const Function *F) const
 Return the target intrinsic ID of a function, or 0. More...
 

Detailed Description

Definition at line 34 of file AMDGPUIntrinsicInfo.h.

Constructor & Destructor Documentation

◆ AMDGPUIntrinsicInfo()

AMDGPUIntrinsicInfo::AMDGPUIntrinsicInfo ( )

Definition at line 23 of file AMDGPUIntrinsicInfo.cpp.

Member Function Documentation

◆ getDeclaration() [1/2]

Function * AMDGPUIntrinsicInfo::getDeclaration ( Module M,
unsigned  ID,
Type **  Tys = nullptr,
unsigned  numTys = 0 
) const
overridevirtual

Create or insert an LLVM Function declaration for an intrinsic, and return it.

The Tys and numTys are for intrinsics with overloaded types. See above for more information.

Implements llvm::TargetIntrinsicInfo.

Definition at line 99 of file AMDGPUIntrinsicInfo.cpp.

References llvm::makeArrayRef().

◆ getDeclaration() [2/2]

Function * AMDGPUIntrinsicInfo::getDeclaration ( Module M,
unsigned  ID,
ArrayRef< Type *>  Tys = None 
) const

◆ getName() [1/2]

StringRef AMDGPUIntrinsicInfo::getName ( unsigned  IntrId,
ArrayRef< Type *>  Tys = None 
) const

◆ getName() [2/2]

std::string AMDGPUIntrinsicInfo::getName ( unsigned  IID,
Type **  Tys = nullptr,
unsigned  numTys = 0 
) const
overridevirtual

Return the name of a target intrinsic, e.g.

"llvm.bfin.ssync". The Tys and numTys parameters are for intrinsics with overloaded types (e.g., those using iAny or fAny). For a declaration for an overloaded intrinsic, Tys should point to an array of numTys pointers to Type, and must provide exactly one type for each overloaded type in the intrinsic.

Implements llvm::TargetIntrinsicInfo.

Definition at line 49 of file AMDGPUIntrinsicInfo.cpp.

References getName(), llvm::makeArrayRef(), and llvm::StringRef::str().

◆ getType()

FunctionType * AMDGPUIntrinsicInfo::getType ( LLVMContext Context,
unsigned  ID,
ArrayRef< Type *>  Tys = None 
) const

Definition at line 54 of file AMDGPUIntrinsicInfo.cpp.

References llvm_unreachable.

Referenced by getDeclaration().

◆ isOverloaded()

bool AMDGPUIntrinsicInfo::isOverloaded ( unsigned  IID) const
overridevirtual

Returns true if the intrinsic can be overloaded.

Implements llvm::TargetIntrinsicInfo.

Definition at line 80 of file AMDGPUIntrinsicInfo.cpp.

Referenced by lookupName().

◆ lookupName()

unsigned AMDGPUIntrinsicInfo::lookupName ( const char Name,
unsigned  Len 
) const
overridevirtual

Look up target intrinsic by name.

Return intrinsic ID or 0 for unknown names.

Implements llvm::TargetIntrinsicInfo.

Definition at line 60 of file AMDGPUIntrinsicInfo.cpp.

References isOverloaded(), llvm::Intrinsic::lookupLLVMIntrinsicByName(), llvm::Intrinsic::num_intrinsics, llvm::StringRef::size(), and llvm::StringRef::startswith().


The documentation for this class was generated from the following files: