Skip to content

Adding a doc comment talking about performance impacts of assume #77561

Closed

Description

@tesuji

So LLVM hasn't changed much since nagisa wrote #54995 (comment).
Here the link to related regression caused by using constly assume intrinsic in const fn: #77023 (comment)

I think we could include a warning for assume intrinsic about using it in const fn and should run a perf for PR using it.

/// This intrinsic does not have a stable counterpart.
#[rustc_const_unstable(feature = "const_assume", issue = "76972")]
pub fn assume(b: bool);

cc @oli-obk

Activity

  1. changed the title [-]Adding a doc comment talk about side-effect of const assume on LLVM[/-] [+]Adding a doc comment talking about side-effect of const assume on LLVM[/+] on Oct 5, 2020
  2. RalfJung commented on Oct 5, 2020

    @RalfJung
    Member

    Is there anything specific about const here? Seems like what @nagisa wrote applies equally to fn and const fn.

  3. added
    A-intrinsics
    A-LLVM
    on Oct 5, 2020
  4. changed the title [-]Adding a doc comment talking about side-effect of const assume on LLVM[/-] [+]Adding a doc comment talking about performance impacts of `assume`[/+] on Oct 6, 2020
  5. added
    A-docs
    T-compiler
    on Oct 15, 2020
  6. lolbinarycat commented on Sep 9, 2024

    @lolbinarycat
    Contributor

    triage: there is now a note about optimizations, and assert_unchecked also has much more explanatory documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMA-docsA-intrinsicsT-compiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions