Skip to content

[MIR] Consider lowering some intrinsic functions to MIR #32716

Closed
@Aatch

Description

@Aatch

Some intrinsic functions can be effectively implemented in pure MIR code. Notably, the wrapping and checked arithmetic functions, which can turn into regular BinaryOp and CheckedBinaryOp (when implemented) rvalues. Similarly intrinsics like move_val_init can be exactly represented in the MIR.

While relatively low impact right now, due to most intrinsics being used via wrapper functions, if/when we get MIR-level inlining, this would allow those intrinsics to better participate in optimisations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-cleanupCategory: PRs that clean code up or issues documenting cleanup.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