Skip to content

[VM] Support instruction either-boxed-or-unboxed input representations #51039

Open
@dcharkes

Description

@dcharkes

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, and BinarySmiOpInstr 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub teamtype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions