[LLVMdev] [PATCH] OpenCL half support

Anton Lokhmotov Anton.Lokhmotov at arm.com
Fri Jul 29 09:01:25 PDT 2011


Hi Chris,

> Please make TYPE_CODE_HALF be "21" at the end of the list.
Done.

> +    HalfTyID,        ///< 16: 16-bit floating-point type
> 
> The comment is wrong, it should be "15:"
Fixed.

> The rest of the patch looks like a reasonable first start, but doesn't
> include code generation or optimizer changes.  The code generator will
> certainly need changes to emit global variables with half floats in
> them (among other things) 
I was under impression that you argued that only backends for targets
supporting the half type natively should implement code generation for half
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-March/038839.html).  AFAIK,
there are no such open-source backends at the moment?

> and I would expect a variety of optimizer changes scattered in for various
> stuff that needs to touch half floats.
I am afraid we could not find such special casing even for 'double'.
Constant propagation does work properly as demonstrated by an included test
case.

Best regards,
Anton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: half-llvm.patch
Type: application/octet-stream
Size: 16365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110729/666fbc5d/attachment.obj>


More information about the llvm-dev mailing list