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

Implement branch prediction intrinsics #20579

Closed
nagisa opened this issue Jan 5, 2015 · 4 comments
Closed

Implement branch prediction intrinsics #20579

nagisa opened this issue Jan 5, 2015 · 4 comments
Labels
A-codegen Area: Code generation

Comments

@nagisa
Copy link
Member

nagisa commented Jan 5, 2015

Branch prediction intrinsic equivalent to GCC’s __builtin_expect should exist. Alternatively two intrinsics likely and unlikely could be implemented.

@nagisa
Copy link
Member Author

nagisa commented Jan 5, 2015

Appears to correspond to llvm.expect intrinsic.

@jdm
Copy link
Contributor

jdm commented Jan 5, 2015

See #17317.

@nagisa
Copy link
Member Author

nagisa commented Jan 5, 2015

I’m be fine with only expect_u* exposed from core::intrinsics. That wouldn’t need any RFC I think. While likely! and unlikely! are nice-to-have, they are simple enough to define in terms of the intrinsics.

@alexcrichton
Copy link
Member

cc @steveklabnik, could this move to the rust-lang/rfcs repo? (feature request)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants