One C compiler I used 30 years ago sacrificed reentrancy for variable folding. It did call chain analysis so that it could alias local variable and function parameters to single global scratch pad variables.
That allowed you to write non trivial programs in C for the 8031/32 without external RAM.
That allowed you to write non trivial programs in C for the 8031/32 without external RAM.