Commits

Joe Groff committed 4ee66d31577
IRGen: Calculate representation types for (fixed-size) unions. Calculate representation types for single-payload and multi-payload unions. For a single-payload union, we consider the extra inhabitant count of the payload type to determine whether the union needs additional tag bit(s) to discriminate the no-payload cases. For a multi-payload union, we determine the intersection of spare bits of the payload types (without trying to move payload types around or anything fancy), then try to fit as many tag bits as possible into those spare bits if available. Swift SVN r7290