Skip to content

de-optimized math replacements / idiom detection #2043

Description

@psifertex

Compilers do lots of fun things to calculate modulo or division with shifts and multiplication. We need a new optimization pass which will replace these more opaque operations with simplified expressions.

See:

https://zneak.github.io/fcd/2017/02/19/divisions.html
https://github.com/hcs0/Hackers-Delight

And a previous plugin that simply annotates with a comment:
https://github.com/cah011/binja-div

Activity

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

Metadata

Metadata

Assignees

Labels

Effort: MediumIssues require < 1 month of workImpact: HighIssue adds or blocks important functionality

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions