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

Add register usage analysis and instruction combine pass #140

Merged
merged 11 commits into from May 17, 2018

Conversation

Projects
None yet
3 participants
@HMPerson1
Collaborator

HMPerson1 commented May 11, 2018

TODO:

  • Export the register usage information info into RadecoFunction
  • An pass that turns b=a+2; c=b-2 => c=b so that the "preserves" analysis is more accurate
    • b=a+b; c=b-2 => c=b+0
    • c=b+0 => c=b
    • b=a+0xfffffffffffffffc => b=a-4

@HMPerson1 HMPerson1 changed the title from [WIP] Add calling convention analysis to [WIP] Add register usage analysis May 11, 2018

@chinmaydd

This comment has been minimized.

Show comment
Hide comment
@chinmaydd

chinmaydd May 15, 2018

Contributor

LGTM! 👍

Contributor

chinmaydd commented May 15, 2018

LGTM! 👍

@HMPerson1 HMPerson1 changed the title from [WIP] Add register usage analysis to Add register usage analysis and instruction combine pass May 15, 2018

@HMPerson1

This comment has been minimized.

Show comment
Hide comment
@HMPerson1

HMPerson1 May 15, 2018

Collaborator

This is ready for merging now @chinmaydd @sushant94

Collaborator

HMPerson1 commented May 15, 2018

This is ready for merging now @chinmaydd @sushant94

HMPerson1 added some commits May 10, 2018

/// This analysis is super conservative; for example, if a function preserves a
/// register by pushing it onto the stack and popping it back right before
/// returning, it is considered to be read and not preserved because we can't
/// guarantee that that stack location is never subsequently read or modified.

This comment has been minimized.

@sushant94

sushant94 May 17, 2018

Collaborator

Open an issue for this so that we can track progress and eventually have a more precise analysis, either in this pass or as a separate one.

@sushant94

sushant94 May 17, 2018

Collaborator

Open an issue for this so that we can track progress and eventually have a more precise analysis, either in this pass or as a separate one.

This comment has been minimized.

@sushant94

sushant94 May 17, 2018

Collaborator

Also, add the issue number in the comment to track it.

@sushant94

sushant94 May 17, 2018

Collaborator

Also, add the issue number in the comment to track it.

@sushant94 sushant94 merged commit b5c8043 into radareorg:master May 17, 2018

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@HMPerson1 HMPerson1 deleted the HMPerson1:fn_param_anal branch May 18, 2018

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