Ramkumar Ramachandra
2015-Jan-16 03:21 UTC
[LLVMdev] Overloaded intrinsics: name explosion
Philip Reames wrote:>> 1. Introduce aAny. > > Having a generic any type seems fine. I assume you'd create something like > an llvm_any_type in Intrinsics.td?That's precisely what ifavpAny is about: integer, float, array, vector, pointer Any. aAny is meant for array-Any, and I wonder why so few people care about arrays. I'll go ahead with Any and llvm_any_type.
Shahid, Asghar-ahmad
2015-Jan-16 04:52 UTC
[LLVMdev] Overloaded intrinsics: name explosion
> That's precisely what ifavpAny is about: integer, float, array, vector, pointer > Any. aAny is meant for array-Any, and I wonder why so few people care > about arrays. I'll go ahead with Any and llvm_any_type.(May be this is over clarification) So an intrinsic declared with 'ifavpAny' can take different overloaded form such as>From llvm.xyz(i32) to llvm.xyz(4xi32) ?Regards, Shahid> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Ramkumar Ramachandra > Sent: Friday, January 16, 2015 8:52 AM > To: Philip Reames > Cc: LLVMdev > Subject: Re: [LLVMdev] Overloaded intrinsics: name explosion > > Philip Reames wrote: > >> 1. Introduce aAny. > > > > Having a generic any type seems fine. I assume you'd create something > > like an llvm_any_type in Intrinsics.td? > > That's precisely what ifavpAny is about: integer, float, array, vector, pointer > Any. aAny is meant for array-Any, and I wonder why so few people care > about arrays. I'll go ahead with Any and llvm_any_type. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Ramkumar Ramachandra
2015-Jan-16 17:20 UTC
[LLVMdev] Overloaded intrinsics: name explosion
Shahid, Asghar-ahmad wrote:> So an intrinsic declared with 'ifavpAny' can take different overloaded form such as > From llvm.xyz(i32) to llvm.xyz(4xi32)Yes, that's correct. Just to fix the notation, let's use real code from my branch: def llvm_any_ty : LLVMType<Any>; def int_experimental_gc_result : Intrinsic<[llvm_any_ty], [llvm_i32_ty]>; Then: %call1 = call i32* @llvm.experimental.gc.result.p0i32(...) %call1 = call float @llvm.experimental.gc.result.f32(...) %call1 = call zeroext i32 @llvm.experimental.gc.result.i32(...) %call1 = call zeroext <2 x i32> @llvm.experimental.gc.result.v2i32(...) etc. I hope to have it properly functioning soon.
On 01/15/2015 07:21 PM, Ramkumar Ramachandra wrote:> Philip Reames wrote: >>> 1. Introduce aAny. >> Having a generic any type seems fine. I assume you'd create something like >> an llvm_any_type in Intrinsics.td? > That's precisely what ifavpAny is about: integer, float, array, > vector, pointer Any. aAny is meant for array-Any,*and I wonder why so > few people care about arrays.*I'll go ahead with Any and > llvm_any_type.(The following is an utter tangent from the original question and is my personal opinion only.) First Class Aggregates (FCAs) - which include arrays and structs - are in a weird middle ground of being supported, but not really optimized. Part of the problem is that no one has expressed a clear use case for them. If we decided they were just a convenience for the frontend, we could lower them early. However, this would give up some potential optimization benefit, so there's been a reluctance to do that. Instead, we're left in this awkward position where they 'work' but aren't really recommended for use. To fix this, we really need an active contributor who wants to use them and drive things forward. That hasn't happen to date. Unfortunately, I think we've managed to drive away a couple of folks who might have become that person due to the slow and rambling debates that tend to arise on FCA review threads. This will eventually get resolved, but I don't see that happening in the immediate future. Philip -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150116/ffa1dcd7/attachment.html>