Method GetIntrinsicDeclaration
GetIntrinsicDeclaration(String, ITypeRef[])
Gets a declaration for an LLVM intrinsic function
Declaration
public IrFunction GetIntrinsicDeclaration(string name, params ITypeRef[] args)
Parameters
public IrFunction GetIntrinsicDeclaration(string name, params ITypeRef[] args)
String | name | Name of the intrinsic |
ITypeRef[] | args | Args for the intrinsic |
Returns
IrFunction | Function declaration |
Remarks
This method will match overloaded intrinsics 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(UInt32, ITypeRef[])
Gets a declaration for an LLVM intrinsic function
Declaration
public IrFunction GetIntrinsicDeclaration(uint id, params ITypeRef[] args)
Parameters
public IrFunction GetIntrinsicDeclaration(uint id, params ITypeRef[] args)
UInt32 | id | id of the intrinsic |
ITypeRef[] | args | Arguments for the intrinsic |
Returns
IrFunction | Function declaration |