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 forceful cheap casting methods #4

Open
10 tasks
Robbepop opened this issue Dec 21, 2017 · 0 comments
Open
10 tasks

Implement forceful cheap casting methods #4

Robbepop opened this issue Dec 21, 2017 · 0 comments

Comments

@Robbepop
Copy link
Owner

Robbepop commented Dec 21, 2017

Currently there are the truncate, zero_extend and sign_extend methods and their siblings into_* for method chaining and strict_* for strict truncation and extension. Besides these a cheap_* sibling might be very useful for operations that shall forcefully be executed with minimal overhead and if it is not possible to truncate or extend an ApInt cheaply the operation will return an Error instead of possibly doing lots of work.

For this the following APIs are required:

  • into_cheap_truncate
  • cheap_truncate
  • into_cheap_zero_extend
  • cheap_zero_extend
  • into_cheap_sign_extend
  • cheap_sign_extend
  • into_cheap_zero_resize
  • cheap_zero_resize
  • into_cheap_sign_resize
  • cheap_sign_resize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant