doc nits
This commit is contained in:
parent
3e8a18dd1b
commit
6ed62fe945
2 changed files with 6 additions and 6 deletions
10
doc/il.txt
10
doc/il.txt
|
@ -761,7 +761,7 @@ will be correctly compiled by QBE.
|
|||
@end
|
||||
ret %s
|
||||
|
||||
Now, if you want to know what a phi instruction is and how
|
||||
Now, if you want to know what phi instructions are and how
|
||||
to use them in QBE, you can read the following.
|
||||
|
||||
Phi instructions are specific to SSA form. In SSA form
|
||||
|
@ -791,10 +791,10 @@ translate it in SSA form is to insert a phi instruction.
|
|||
%y =w phi @ift 1, @iff 2
|
||||
ret %y
|
||||
|
||||
The phi in the example expresses a choice depending on
|
||||
which block the control came from. When the `@ift` block
|
||||
is taken, the phi instruction defining `%y` selects 1;
|
||||
if `@iff` is taken, 2 is selected.
|
||||
Phi instructions return one of their arguments depending
|
||||
on where the control came from. In the example, `%y` is
|
||||
set to 1 if the `@ift` branch is taken, and it is set to
|
||||
2 otherwise.
|
||||
|
||||
An important remark about phi instructions is that QBE
|
||||
assumes that if a variable is defined by a phi it respects
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue