[llvm-dev] Adding 'v16f16' to tablegen

Martin J. O'Riordan via llvm-dev llvm-dev at lists.llvm.org
Sun Mar 6 01:17:51 PST 2016


Thanks Craig.

 

I have ‘v16f16’ added to ‘ValueTypes.td’ just before ‘v1f32’ and then the values of the following enumerates increased by one to correspond to this insertion.  And also changed ‘include/llvm/CodeGen/MachineValueType.h’ to match this change.

 

However, I have not changed ‘utils/TableGen/CodeGenTarget.cpp’ so I will try that out.

 

Thanks for this insight,

 

            MartinO

 

From: Craig Topper [mailto:craig.topper at gmail.com] 
Sent: 06 March 2016 02:06
To: Martin.ORiordan at movidius.com
Cc: LLVM Developers <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] Adding 'v16f16' to tablegen

 

Did you add the type to include llvm/CodeGen/ValueTypes.td and utils/TableGen/CodeGenTarget.cpp?

 

On Sat, Mar 5, 2016 at 2:26 PM, Martin J. O'Riordan via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > wrote:

I have been able to adapt the main LLVM sources to work with vectors of 16 x FP16 values and I have introduced the ‘v16f16’ data type to CLang and LLVM, but I am stumped on how to get TableGen to recognise this type.  At the moment I am trying to optimise the calling convention code, and whenever I refer to ‘v16f16’ I get a crash in TableGen (unrecognised type).  Unfortunately I haven’t got my head around the innards of TableGen yet, so I am asking if anyone has any advice on how to add a new vector data type to TableGen?

 

The main reason I need this is that OpenCL supports vectors with 16 elements for all supported scalar types, and the SHAVE processor does support FP16 (aka ‘half’) data types.  Although we don’t natively support 16 x FP16, I would like to optimise how values of this type are passed and returned; so any advice is appreciated.

 

I have the same problem with ‘v16f64’, although this type does not occur in any real code that I have found outside the OpenCL test-suite.

 

Thanks,

 

            MartinO

 


_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> 
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev





 

-- 

~Craig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160306/cf21d4a0/attachment.html>


More information about the llvm-dev mailing list