- if (tag && (!tag_is_valid(tag) || !tag_set_intersects(set, tag))) {
- /* XXX We could do better by finding the set member to which we would
- * add the fewest number of 1-bits. This would reduce the amount of
- * ambiguity, since e.g. three 1-bits match 3 * 2 / 2 = 3 unique tags
- * whereas four 1-bits match 4 * 3 / 2 = 6 unique tags. */
- tag_type *t = &set->tags[set->n++ % TAG_SET_SIZE];
- *t |= tag;
- if (*t == TYPE_MAXIMUM(tag_type)) {
- set->tags[0] = *t;
- }
-
- set->total |= tag;