Skip to content

Implement forceful cheap casting methods #4

@Robbepop

Description

@Robbepop

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions