Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tesuji opened this issue Oct 5, 2020 · 2 comments
Closed

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

tesuji opened this issue Oct 5, 2020 · 2 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-intrinsics Area: Intrinsics A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Oct 5, 2020

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

@tesuji tesuji 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 Oct 5, 2020
@RalfJung
Copy link
Member

RalfJung commented Oct 5, 2020

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

@jonas-schievink jonas-schievink added A-intrinsics Area: Intrinsics A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. labels Oct 5, 2020
@ecstatic-morse ecstatic-morse 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 Oct 6, 2020
@camelid camelid added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 15, 2020
@lolbinarycat
Copy link
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
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-intrinsics Area: Intrinsics A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants