Skip to content

Expand cold documentation. #543

Open
@ehuss

Description

@ehuss

Should there be more documentation about what the cold attribute does? Or is
that an implementation detail? Its effects depend on the backend in use.

  • It reduces the MIR inlining threshold.
  • The LLVM backend: "This calling convention attempts to make code in the caller as
    efficient as possible under the assumption that the call is not commonly
    executed. As such, these calls often preserve all registers so that the
    call does not break any live ranges in the caller side."

One option is to include the information in a note block making it clear it is rustc behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions