Skip to content

Commit 568e59e

Browse files
committed
Move SSA warning
I think it is a little more helpful to put this warning next to where we introduce the now-deprecated `phi` instruction.
1 parent 0fbe948 commit 568e59e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/lesson/6.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Of course, things will get a little more complicated when there is control flow.
6161
And because real machines are not SSA, using separate variables (i.e., memory locations and registers) for everything is bound to be inefficient.
6262
The idea in SSA is to convert general programs into SSA form, do all our optimization there, and then convert back to a standard mutating form before we generate backend code.
6363

64-
### ϕ-Nodes {###Phi-Nodes}
64+
### ϕ-Nodes {#phi-nodes}
6565

6666
Just renaming assignments willy-nilly will quickly run into problems.
6767
Consider this program:
@@ -112,6 +112,8 @@ You can write the above program in SSA like this:
112112

113113
It can also be useful to see how ϕ-nodes crop up in loops.
114114

115+
**Warning:** This `phi` instruction in Bril code is for illustration purposes only. Bril previously used `phi` instructions for [an old, now-deprecated version of SSA][bril-ssa1]. See the section below about [SSA in Bril](#bril-ssa) for details about [the current SSA extension][bril-ssa2].
116+
115117
### The SSA Philosophy
116118

117119
In addition to a language form, SSA is also a philosophy!
@@ -389,9 +391,7 @@ An optimization that stitches together two blocks, for instance, can leave `get`
389391

390392
[pizlo]: https://gist.github.com/pizlonator/79b0aa601912ff1a0eb1cb9253f5e98d
391393

392-
### Bril in SSA
393-
394-
**Warning**: The `phi` instruction described in [ϕ-Nodes](###Phi-Nodes) is [deprecated][bril-ssa1] in the reference interpreter.
394+
### Bril in SSA {#bril-ssa}
395395

396396
Bril has an [SSA extension][bril-ssa2] that follows the "upsilon/phi form" representation.
397397
It adds support for `set` and `get` instructions, which correspond to Pizlo's upsilon and phi operations.

0 commit comments

Comments
 (0)