Open
Description
We don't have a Representation
that says "either be tagged (Smi) or unboxed". All instructions either take a representation as input or are specialized per instruction:
IntConverterInstr
takes a representation as input.LoadIndexedInstr
takes a boolean whether the index is unboxed.BinaryInt32OpInstr
takes unboxed ints, andBinarySmiOpInstr
tagged ints.
It would be beneficial to add a new "either be unboxed or tagged" Representation
to RequiredInputRepresentation
. This would also require doing a non trivial analysis to select the representation that inserts the smallest amount unboxing and int conversion instructions.
Note that this would be the opposite of our wish to completely remove the select-representations phase. (I don't remember who mentioned that wish, I believe it was one of you: @rmacnak @aam @alexmarkov.)
Alternative suggestions to get rid of smi-untag operations welcome.
cc @mraleph
Split out from: