update the "-cl-kernel-arg-info" option for SPIR

Ribulous Barnulous rnickb731 at gmail.com
Sat Nov 22 21:37:41 PST 2014


Currently, kernel argument metadata is omitted unless the
"-cl-kernel-arg-info" option is specified.

But according to the latest SPIR specification
https://www.khronos.org/registry/spir/specs/spir_spec-1.2.pdf
section 2.4, all metadata except for the kernel_arg_name nodes should be
emitted, and kernel_arg_name is only emitted when "-cl-kernel-arg-info" is
specified.

"""Kernel argument specific information is preserved using metadata
objects. These objects are gen- erated for every kernel, with an exception
for the kernel arg name metadata, which is generated only when the
-cl-kernel-arg-info
build option is specified for compilation. The metadata nodes describing
the kernel argument info are in the form of a string tag, and then a list
of the corresponding data for each one of the kernel’s arguments."""

This patch fixes the behavior of the option and updates the associated test
cases.

It is a follow up to this bug report:
http://llvm.org/bugs/show_bug.cgi?id=21555

Let me know if you have questions or would like any further changes. -
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141123/30ad1b52/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spir-arginfo.patch
Type: application/octet-stream
Size: 7240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141123/30ad1b52/attachment.obj>


More information about the cfe-commits mailing list