This patch adds a linear polynomial base class, called LinearPolyBase, which
serves as a base class for ElementCount,StackOffset. TypeSize and StackOffset.It tries to represent a linear
It tries to represent a linear polynomial like:
c0 * scale0 + c1 * scale1 + ... + cK * scaleK
where the scale is implicit, meaning that only the coefficients are
encoded.
This patch also adds a univariate linear polynomial, which serves as
a base class for ElementCount and TypeSize. This tries to represent a
linear polynomial where only one dimension can be set at any one time,
i.e. a TypeSize is either fixedsized, From LinearPolyBaseor scalablesized, other classes are derived:but cannot be
a combination of the two.
class LinearPolyBase<Type, Dimensions, IsUnivariate>
^

+ using StackOffsetBase = PolyBase<int64_t, 2, false>
^ ^
 
 + class StackOffset (dimensions = 2 (fixed/scalable), type = int64_t)
class StackOffset : StackOffsetUnivariateLinearPolyBase


+ usingclass LinearPolySizeBase<T> = LinearPolyBase<T, 2, true> (dimensions = 2 (fixed/scalable))
^

class LinearPolySize<T> : LinearPolySizeBase<T>
^

+ class ElementCount : PolySize< (type = unsigned>)


+ class TypeSize : PolySize<uint64_t>
The plan is for class TypeSize to become a using/typedef as well. (type = uint64_t)