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

Reduce number of variables for arguments in functions #15

Open
tomsik68 opened this issue Jul 25, 2019 · 1 comment
Open

Reduce number of variables for arguments in functions #15

tomsik68 opened this issue Jul 25, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@tomsik68
Copy link
Member

Currently, each argument for function gets 2 stack-allocated variables. For example:

int main(int argc, char** argv) {
    int var0;
    char** var1;

    var0 = argc;
    var1 = argv;
}

And the variables of the arguments themselves are not used anymore. We could get rid of variables like var0 and var1.

@tomsik68 tomsik68 added the enhancement New feature or request label Jul 25, 2019
@tomsik68
Copy link
Member Author

Optimizing the LLVM before decompiling it removes these variables. So it's not too important to solve this directly in llvm2c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant