Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Clarify when StorageLive is legal #39

@RalfJung

Description

@RalfJung

StorageLive compiles to llvm.lifetime.start. It is an open question whether it is allowed to call StorageLive on a local that has already been marked as live. Currently, rustc emits code that relies on this being okay.
To account for some optimizations that LLVM has been caught performing, at the very least, we have to declare that StorageLive resets the contents of a local back to Undef. It seems this is consistent with what rustc currently emits.

See rust-lang/rust#42371 for more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions