File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -387,11 +387,13 @@ <h2>Allocating Stack Variables</h2>
387
387
block.
388
388
</ p >
389
389
< p >
390
- The problem with inserting at the end of the block is that
391
- the variables always appear after they are used, which is an
392
- error. A different approach might be to always insert before
393
- the first instruction, but in that case, it's always the
394
- latest variable appearing first, so the order is reversed.
390
+ Certain optimization passes only work if all of the
391
+ variables are allocated in the entry block of the function,
392
+ so allocating them into the most recent block is missing out
393
+ on a better optimized code. A different approach might be to
394
+ always insert before the first instruction, but in that
395
+ case, it's always the latest variable appearing first, so
396
+ the order is reversed.
395
397
</ p >
396
398
< p >
397
399
The idea is to insert a placeholder instruction at the
You can’t perform that action at this time.
0 commit comments