During early early gather/scatter enablement two different
approaches were taken to represent scaled indices:
- A Scale operand whereby byte_offsets = Index * Scale
- An IndexType whereby byte_offsets = Index * sizeof(MemVT.ElementType)
Having multiple representations is bad as shown by this patch which
fixes instances where the two are out of sync. The dedicated scale
operand is more flexible and pervasive so this patch removes the
UNSCALED values from IndexType. This means all indices are scaled
but the scale can be one, hence unscaled. SDNodes now use the scale
operand to answer the "isScaledIndex" question.
I toyed with the idea of keeping the UNSCALED enums and helper
functions but because they will have no uses and force SDNodes to
validate the set of supported values I figured it's best to remove
them. We can re-add them if there's a real need. For similar
reasons I've kept the IndexType enum when a bool could be used as I
think being explicitly looks better.
Depends On D123347
With scaling removed, there's a decision to be made regarding whether to keep the IndexType enum or just represent the signed information as a bool. So I figured I'd maintain these now seemingly redundant helper functions until the best option is decided.