Method GetIntrinsicDeclaration
GetIntrinsicDeclaration(LazyEncodedString, params ITypeRef[])
Gets a declaration for an LLVM intrinsic function
Function GetIntrinsicDeclaration(LazyEncodedString name, params ITypeRef[] args)
Parameters
name
LazyEncodedStringName of the intrinsic
args
ITypeRef[]Args for the intrinsic
Returns
- Function
Function declaration
Remarks
This method will match an overloaded intrinsic based on the parameter types. If an intrinsic has no overloads then an exact match is required. If the intrinsic has overloads than a prefix match is used.
important
It is important to note that the prefix match requires the name provided to have a length greater than that of the name of the intrinsic and that the name starts with a matching overloaded intrinsic. for example: 'llvm.memset' would not match the overloaded memset intrinsic but 'llvm.memset.p.i' does. Thus, it is generally a good idea to use the signature from the LLVM documentation without the address space, or bit widths. That is instead of 'llvm.memset.p0i8.i32' use 'llvm.memset.p.i'.
GetIntrinsicDeclaration(uint, params ITypeRef[])
Gets a declaration for an LLVM intrinsic function
Function GetIntrinsicDeclaration(uint id, params ITypeRef[] args)
Parameters
Returns
- Function
Function declaration