[PATCH] D20979: [OpenCL] Use function attribute/metadata to represent kernel attributes

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 14:45:29 PDT 2016


yaxunl added a comment.

In http://reviews.llvm.org/D20979#453632, @Anastasia wrote:

> In http://reviews.llvm.org/D20979#452616, @yaxunl wrote:
>
> > In http://reviews.llvm.org/D20979#452463, @Anastasia wrote:
> >
> > > Looking good generally, I am just not sure about mixing two different representations.
> >
> >
> > If we choose only one form of representation, would you suggest to use function metadata or function attribute?
>
>
> I am still not sure if this is the intended use of target-dependent attributes to be honest. So I would prefer metadata representation.
>
> Also if we use metadata could we avoid parsing values from strings potentially in contrast to attributes that represent all values as strings?


OK due to the controversy of target-dependent function attributes, let's concur to use function metadata for all the kernel attributes, and do not convert everything to string in the metadata.

> Related to your earlier comments about inflexibility of metadata, would it be possible to extend MDNode to be able to insert new operands?


I will see how difficult is that.


http://reviews.llvm.org/D20979





More information about the cfe-commits mailing list