Skip to content

expose a way to mark cold/hot branches with llvm.expect #10137

Closed
@thestinger

Description

@thestinger

There are places where this would be very useful like the slow path in a vector push method. Sadly, there's not an obvious way to expose llvm.expect because a regular Rust intrinsic becomes a function and lower-expect runs in the function pass stage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions