Skip to content

Commit 84cc901

Browse files
authored
Minor typographical changes (#42370)
I changed "julia" to "Julia", added some commas, and changed a little sentence structure in the first paragraph
1 parent 4dea1c4 commit 84cc901

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/src/devdocs/ssair.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Background
44

55
Beginning in Julia 0.7, parts of the compiler use a new [SSA-form](https://en.wikipedia.org/wiki/Static_single_assignment_form)
6-
intermediate representation. Historically, the compiler used to directly generate LLVM IR, from a lowered form of the Julia
6+
intermediate representation. Historically, the compiler would directly generate LLVM IR from a lowered form of the Julia
77
AST. This form had most syntactic abstractions removed, but still looked a lot like an abstract syntax tree.
88
Over time, in order to facilitate optimizations, SSA values were introduced to this IR and the IR was
9-
linearized (i.e. a form where function arguments may only be SSA values or constants). However, non-SSA values
9+
linearized (i.e. turned into a form where function arguments could only be SSA values or constants). However, non-SSA values
1010
(slots) remained in the IR due to the lack of Phi nodes in the IR (necessary for back-edges and re-merging of
11-
conditional control flow), negating much of the usefulness of the SSA form representation to perform
11+
conditional control flow). This negated much of the usefulness of SSA form representation when performing
1212
middle end optimizations. Some heroic effort was put into making these optimizations work without a complete SSA
1313
form representation, but the lack of such a representation ultimately proved prohibitive.
1414

@@ -74,7 +74,7 @@ that is generally done for most optimizations that care about these conditions a
7474

7575
Exception handling complicates the SSA story moderately, because exception handling
7676
introduces additional control flow edges into the IR across which values must be tracked.
77-
One approach to do so, which is followed by LLVM is to make calls which may throw exceptions
77+
One approach to do so, which is followed by LLVM, is to make calls which may throw exceptions
7878
into basic block terminators and add an explicit control flow edge to the catch handler:
7979

8080
```
@@ -87,16 +87,16 @@ catch:
8787
# Exceptions go here
8888
```
8989

90-
However, this is problematic in a language like julia where at the start of the optimization
90+
However, this is problematic in a language like Julia, where at the start of the optimization
9191
pipeline, we do not know which calls throw. We would have to conservatively assume that every
92-
call (which in julia is every statement) throws. This would have several negative effects.
92+
call (which in Julia is every statement) throws. This would have several negative effects.
9393
On the one hand, it would essentially reduce the scope of every basic block to a single call,
9494
defeating the purpose of having operations be performed at the basic block level. On the other
9595
hand, every catch basic block would have `n*m` phi node arguments (`n`, the number of statements
96-
in the critical region, `m` the number of live values through the catch block). To work around
97-
this, we use a combination of `Upsilon` and `PhiC` (the C standing for `catch`,
98-
written `φᶜ` in the IR pretty printer, because
99-
unicode subscript c is not available) nodes. There are several ways to think of these nodes, but
96+
in the critical region, `m` the number of live values through the catch block).
97+
98+
To work around this, we use a combination of `Upsilon` and `PhiC` nodes (the C standing for `catch`,
99+
written `φᶜ` in the IR pretty printer, because unicode subscript c is not available). There are several ways to think of these nodes, but
100100
perhaps the easiest is to think of each `PhiC` as a load from a unique store-many, read-once slot,
101101
with `Upsilon` being the corresponding store operation. The `PhiC` has an operand list of all the
102102
upsilon nodes that store to its implicit slot. The `Upsilon` nodes however, do not record which `PhiC`

0 commit comments

Comments
 (0)