[LLVMdev] Changes to the PTX calling conventions

Justin Holewinski justin.holewinski at gmail.com
Wed Dec 14 05:35:50 PST 2011

2011/12/14 Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi>

> On 12/14/2011 02:41 PM, Justin Holewinski wrote:
>> I would favor calling conventions over metadata for the simple reason
>> that this maps more cleanly to the device model.  Device and kernel
>> functions are represented differently in PTX, including (sometimes) the
>> way parameters are passed.
> For the record, marking the kernels with "calling conventions" instead
> of metadata is fine also for the pocl use case. It's enough if there is a
> way
> to differentiate OpenCL C kernels from the "device functions" for the
> reason
> I discussed in the previous email. That is, in the pocl point of view we
> just
> need a way to pick the "host-callable" kernel functions as they need the
> special treatment before they can be called (like a C function).
> BTW what about the other OpenCL data like required_wg_size which
> affect the possible "kernel treatment" of pocl and can be converted to some
> special instructions (I suppose) for the SIMT targets? Currently only the
> TCE target in Clang adds metadata for the required_wg_size kernel
> attribute (as we need it in "offline compilation") but IMHO that could be
> useful in general, as a default metadata (to enable its support in pocl
> for all targets, for example).

Ideally, we would need some standard way of representing this in Clang.
 The back-end would then need to convert it to whatever form the target
OpenCL run-time expects.

This is a question for cfe-dev.

> --
> Pekka



Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111214/c4ac389e/attachment.html>

More information about the llvm-dev mailing list