[cfe-dev] Question on __attribute__((vector_size)) and templates
richard at metafoo.co.uk
Thu Jun 25 14:16:35 PDT 2015
On Thu, Jun 18, 2015 at 5:35 AM, Alexey Frolov <alexfrolov1878 at yandex.ru>
> Hi Richard, Aaron,
> I have a question regarding issue described in http://llvm.org/PR15730
> and http://llvm.org/PR16986.
> In comment 1 of PR16986 Richard said:
> >> We should generalize the handling of dependent expressions from the
> alignment attributes to deal with this case too.
> As far as I know, alignment attributes only appertain to variables or
> typedefs (which both have AST nodes). I don't think we can generalize this
> approach for vector_size attribute as it appertains to types (which do not
> have AST nodes).
> What about creating a new property for VectorType that would state that
> this vector type is dependent (dependent vector types are vector types with
> dependent base types and/or dependent size expressions)? It seems to be
> somewhat more appropriate to me.
> This will be somewhat similat to the way ExtVectorType and
> DependentSizedExtVectorType are treated.
> What do you think?
The direction I was thinking of was more like this:
* Change AttributedTypeLoc to store an Attr* rather than an Expr* so we
can reuse the autogenerated Attr instantiation code
* If the alignment of the vector is dependent, make the equivalent type of
the corresponding AttributedType be DependentTy
* Remove DependentSizedExtVectorType
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev