mingodad
2 months ago
I did the same for tinycc here https://github.com/mingodad/tinycc and used Netbeans IDE that has great refactoring options for C/C++/Java.
Benchmarking the reentrant result showed it to be around 5% slower.
Now I'm trying to redo it again but this time scripting the refactoring using sparse https://github.com/lucvoo/sparse to parse and using it's error messages with with line/column to guide the refactoring, I already got an initial script that performs some initial transformations and is repeatable, but more work need to be done, mainly enhance/extend the info that sparse provide while parsing the code.
mingodad
2 months ago
Also for C/C++ binaries with debug info gdb is one of the ingredients used to show where and how much globals exists:
gdb -batch -ex "info variables" -ex quit --args binary-to-examine