On Jun 16, 2009, at 5:49 PM, David Greene wrote:> On Tuesday 16 June 2009 19:35, David Greene wrote: > >> So which is more intuitive and less error-prone? >> >> defm BLENDPS : >> sse41_avx_fp_binary_vector_osta_vintrinsic_rmi_rrmi<0x0C, >> i32i8imm, "blend", "blend", "f32", 4>; >> >> or >> >> defm BLENDPS : >> sse41_avx_fp_binary_vector_osta_vintrinsic_rmi_rrmi<0x0C, >> i32i8imm, "blendps", "blendps">; > > Here's another option: > > defm BLENDPS : > sse41_avx_fp_binary_vector_osta_vintrinsic_rmi_rrmi<0x0C, > i32i8imm, "blendps", "blendps", v4f32, v8f32>; > > This is somewhere between the first and second options. It's not as > convenient as the second but is more intuitive than the first. Still, > looking at some random individual instruction, it wouldn't be > immediately > clear to me what those multiple types mean. I might think they're > source > and destination types, for example.I think I understand what you're saying with "munging strings is easier". However, I still don't understand why you can't pass down some 'my_f32' instead of '"f32"' and have the defm pull out the right fields from my_f32. The AVX type would be v8f32, the SSE type would be v4f32, etc. More generally, I don't see how strings can be better in any circumstance: in any case where you pass down a string, you can pass down a def that has fields relating to how you would otherwise munge the string, no? -Chris
On Wednesday 17 June 2009 01:06, Chris Lattner wrote:> I think I understand what you're saying with "munging strings is > easier". However, I still don't understand why you can't pass down > some 'my_f32' instead of '"f32"' and have the defm pull out the right > fields from my_f32. The AVX type would be v8f32, the SSE type would > be v4f32, etc. > > More generally, I don't see how strings can be better in any > circumstance: in any case where you pass down a string, you can pass > down a def that has fields relating to how you would otherwise munge > the string, no?Ok, I've been refactoring things here a bit and I think what you propose will work. I'll run with it and see if I get myself into any trouble. Thanks for pushing on this. I think things'll come out better because of it. -Dave
On Jun 18, 2009, at 9:42 AM, David Greene wrote:> On Wednesday 17 June 2009 01:06, Chris Lattner wrote: > >> I think I understand what you're saying with "munging strings is >> easier". However, I still don't understand why you can't pass down >> some 'my_f32' instead of '"f32"' and have the defm pull out the right >> fields from my_f32. The AVX type would be v8f32, the SSE type would >> be v4f32, etc. >> >> More generally, I don't see how strings can be better in any >> circumstance: in any case where you pass down a string, you can pass >> down a def that has fields relating to how you would otherwise munge >> the string, no? > > Ok, I've been refactoring things here a bit and I think what you > propose > will work. I'll run with it and see if I get myself into any trouble. > > Thanks for pushing on this. I think things'll come out better because > of it.Thank you Dave, I really appreciate your work on this! -Chris