23 Aug
2023
23 Aug
'23
7:39 p.m.
On Wed, Aug 23, 2023 at 11:26:12AM -0500, Pierre-Louis Bossart wrote:
On 8/23/23 11:19, Mark Brown wrote:
Isn't that just going to be a function of the compiler being smart enough to work out that there aren't overlapping uses of the two variables and they can share stack space? There's no reason not to help it figure that out.
One would think that compilers understand the variable scope, and free-up the stack when leaving a for loop scope?
Clearly it's possible, but it's the sort of thing I can imagine is left to an optimisation pass and missed sometimes for whatever reason.