Skip to content

[rustc_codegen_ssa] Let function calls and definitions use OperandValue or custom enum instead of Bx::Value #67097

Open
@bjorn3

Description

@bjorn3

For example Bx::Value is assumed to be able to contain a pair

I know this is offtopic but I just wanted to note that pair creation is intentionally funnelled through methods with "immediate_or_packed_pair" in their name, and they're limited to function inputs/outputs, for both calls and definitions (including e.g returns).
The solution there is to have an enum (or reuse OperandValue) which is used for e.g. call, invoke, ret and function params, but nothing else.

Originally posted by @eddyb in #65881 (comment)

This is necessary to use cg_ssa with backends which can't represent pairs in Bx::Value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-craneliftThings relevant to the [future] cranelift backendC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions