Instead of checking whether if the type is ScalableVectorType, define a
predicate function for scalable types. It will be easier for us to extend
the meaning of 'scalable types'. For example, if we want to support scalable
vectors within a struct in the future, the type will be StructType, not
ScalableVectorType, but it is still a scalable type.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I guess the question here is whether a "scalable type" is the same as a "scalable vector type". I can imagine that we might want something more specific to vectors in many cases, e.g. "isScalableVectorType", whereas "isScalableType" could potentially apply to more than just vectors.
I'm not convinced this is correct.
For example, shufflevector only works on vectors, so i don't see why a "struct with scalable vector" is even relevant there.
I think it is checking isScalableType is some cases and checking isScalableVectorType in other cases. I will separate them.
What does isScalableVectorType() provide over the previous isa<ScalableVectorType>? Especially since it still appears next to cast<FixedVectorType>
It seems only has one possibility for isScalableVectorType(). I will revert these cases.