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

Attachment: spir-arginfo.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to