[PATCH] D48617: [Builtins][Attributes][X86] Tag all X86 builtins with their required vector width. Add a min_vector_width function attribute and tag all x86 instrinsics with it.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 2 13:39:14 PDT 2018
aaron.ballman added inline comments.
Comment at: include/clang/Basic/Attr.td:1949
+ let Args = [UnsignedArgument<"VectorWidth">];
+ let Subjects = SubjectList<[Function], ErrorDiag>;
+ let Documentation = [Undocumented];
> aaron.ballman wrote:
> > craig.topper wrote:
> > > aaron.ballman wrote:
> > > > Should this apply to Objective-C methods? What about other function-like interfaces such as function pointers?
> > > I think maybe it should apply to objective-C. but I"m not sure because it doesn't look like the target attribute applies there?
> > I don't have strong opinions on the question, I just wasn't sure if this attribute would be something an ObjC method would want to make use of. If that's unlikely, it's reasonable to leave it off until a use case appears.
> Should it in theory? Yes.
> But if/when we want to make good on that in practice, we would need to do the same for the target attribute as Craig mentions. I think it would be good to defer doing anything here to that point -- we don't need these to be *more* powerful than the target attribute in that regard.
Strong agreement; that was the conclusion @craig.topper and I came to on IRC as well.
More information about the cfe-commits