Open op2786 opened 1 year ago
In general I support all of these optimizations, however it makes it so the type information isn't right there in your face and you would have to jump to the function to find the type name.
If I understand you concern correctly, I guess it can be solved by showing variable type on hover.
Actually this is not related just for global variables. Here is an example that does not uses a global variable:
100126f2 int32_t eax_12 = my_str.max_size
100126f8 if (eax_12 u>= 0x10) {
100126fc void* var_238_4
100126fc var_238_4.b = my_str.s[0]
100126fc var_238_4:1.b = my_str.s[1]
100126fc var_238_4:2.b = my_str.s[2]
100126fc var_238_4:3.b = my_str.s[3]
100126ff std::string::check_params(var_238_4, eax_12 + 1)
I would prefer BN use my_str.max_size
directly at 100126f8
and 100126ff
.
could be simplified like this:
Another example:
which could be simplified like this:
Another one:
which cold be simplified to:
Actually there is cases which codes like above already simplified, but because of some interesting decision these ones does not simplified.