[LLVMdev] Changes to the PTX calling conventions

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Wed Dec 14 04:54:10 PST 2011


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).

-- 
Pekka



More information about the llvm-dev mailing list