Skip to content

Commit 6e374f9

Browse files
committed
[www] fix wrong statement regarding alloca placement
1 parent 9e760bc commit 6e374f9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

www/codegen.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,13 @@ <h2>Allocating Stack Variables</h2>
387387
block.
388388
</p>
389389
<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.
395397
</p>
396398
<p>
397399
The idea is to insert a placeholder instruction at the

0 commit comments

Comments
 (0)