Closed PiJoules closed 1 year ago
We have an active PR in #159 to make certain extended types substitutable. Should these be substitution candidates if the same type is used in multiple places?
I asked around and we unfortunately don't know how common it would be to have mangled signatures with fixed-point types in them in places we might intend to use them. Sorry for the incomplete answer. Although given that the largest mangling for a fixed-point type is 5 characters and substitutions should be less than that, we still think having a sub should provide savings.
Okay. The abstract guideline here is that adding substitutions does have a cost: in longer symbols, it can actually increase overall symbol size by filling the substitution table with a lot of extra types, making later substitutions larger. I would say the line is around 4 bytes — a 3-byte mangling is probably not worth substituting, but a 5-byte mangling probably is.
Applying that to this would make only the saturating types candidates. But treating different fixed-point types differently might be annoying to implement, and it's probably not a big deal either way.
Given that, do you have a strong opinion?
Okay. The abstract guideline here is that adding substitutions does have a cost: in longer symbols, it can actually increase overall symbol size by filling the substitution table with a lot of extra types, making later substitutions larger. I would say the line is around 4 bytes — a 3-byte mangling is probably not worth substituting, but a 5-byte mangling probably is.
Applying that to this would make only the saturating types candidates. But treating different fixed-point types differently might be annoying to implement, and it's probably not a big deal either way.
Given that, do you have a strong opinion?
Yeah in that case I'd probably want to aim for consistency and would lean towards not making any of them candidates.
ping for any more comments on this
Looks good to me.
Alright, I think this has been open for long enough.
Not sure how to "reference" issues with PRs, but this is for issue https://github.com/itanium-cxx-abi/cxx-abi/issues/56