[cfe-commits] [llvm-commits] Patch: Add get_global_id builtin/intrinsic

Rotem, Nadav nadav.rotem at intel.com
Fri Feb 3 13:26:14 PST 2012


Tom, 

I can see a number of problems with this patch.  First, get_global_id does not return llvm_i32_ty on 64bit systems. It returns size_t (which is i64 on x86_64).  Second, I am not sure that this is the correct approach for implementing this. What's wrong with having get_global_id as a standard library call ? Why do we need a special intrinsic for it ?

Thanks,
Nadav 

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Tom Stellard
Sent: Friday, February 03, 2012 23:19
To: llvm-commits at cs.uiuc.edu; cfe-commits at cs.uiuc.edu
Subject: [llvm-commits] Patch: Add get_global_id builtin/intrinsic

Hi,

I've attached two patches, one for llvm and one for clang that add support for the OpenCL C builtin function get_global_id().  I would like to eventually add support for more OpenCL builtins to clang/llvm, but this initial patch is just to make sure I'm doing it the right way.

Please review.

Thanks,
Tom Stellard

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the cfe-commits mailing list