arocc
arocc copied to clipboard
Normalize aligned attributes
We currently store all defined aligned attributes for types but only use the largest. I don't see why this couldn't be normalized when creating the attributed type.
Are you thinking something like sorting the aligned attributes by requested alignment? That way ty.getAttribute(.aligned) would get the largest one and we wouldn't need the requestedAlignment function.
I was thinking that we could check existing and new attributes for the largest alignment and only store one alignment attribute with that type. This deduplication should also happen to most other attributes.