llvm2c
llvm2c copied to clipboard
Reduce number of variables for arguments in functions
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.
Optimizing the LLVM before decompiling it removes these variables. So it's not too important to solve this directly in llvm2c.