arocc icon indicating copy to clipboard operation
arocc copied to clipboard

Normalize aligned attributes

Open Vexu opened this issue 3 years ago • 2 comments

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.

Vexu avatar Jan 24 '22 18:01 Vexu

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.

ehaas avatar Jan 25 '22 16:01 ehaas

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.

Vexu avatar Jan 26 '22 11:01 Vexu