File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ These optimizations also tend to prove the soundness of bigger optimizations
88
88
such as loop vectorization, constant propagation, and dead code elimination.
89
89
90
90
In the previous example, we used the fact that ` &mut u32 ` can't be aliased to prove
91
- that writes to ` *output ` can't possibly affect ` *input ` . This let us cache ` *input `
91
+ that writes to ` *output ` can't possibly affect ` *input ` . This lets us cache ` *input `
92
92
in a register, eliminating a read.
93
93
94
94
By caching this read, we knew that the write in the ` > 10 ` branch couldn't
@@ -118,8 +118,8 @@ fn compute(input: &u32, output: &mut u32) {
118
118
}
119
119
```
120
120
121
- We're still relying on alias analysis to assume that ` temp ` doesn't alias
122
- ` input ` , but the proof is much simpler: the value of a local variable can't be
121
+ We're still relying on alias analysis to assume that ` input ` doesn't alias
122
+ ` temp ` , but the proof is much simpler: the value of a local variable can't be
123
123
aliased by things that existed before it was declared. This is an assumption
124
124
every language freely makes, and so this version of the function could be
125
125
optimized the way we want in any language.
You can’t perform that action at this time.
0 commit comments