[llvm-dev] Enforcing that an intrinsic takes a struct
Ryan Taylor via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 4 05:26:46 PDT 2016
You might want to take a look at the Semantic Checker.
I believe the intrinsic name defaults to intrinsic var name (ie int_sqrt
defaults to llvm.sqrt... since Intrinsic is llvm::Intrinsic).
On Thu, Nov 3, 2016 at 10:48 PM, Louis Li via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi there -- new to LLVM development. I'm trying to define an intrinsic
> function that takes a pointer to an LLVM struct type (e.g., MyStruct*).
> def int_mynewintrinsic : Intrinsic<, [llvm_ptr_ty]>
> From what I can see in Intrinsics.td, it's only possible to specify that
> it takes some pointer, whose responsibility is it to enforce / how can I
> enforce that the pointer points to a struct of the desired type?
> Related question: Intrinsic has the signature below, but nearly all of the
> functions do not define name "" -- why do some do it and some don't? (e.g.,
> llvm.va_copy does)
> class Intrinsic<list<LLVMType> ret_types,
> list<LLVMType> param_types = ,
> list<IntrinsicProperty> properties = ,
> string name = ""> :
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev