Skip to content

Commit 12900c8

Browse files
mark-i-mJohnTitor
andcommitted
Use common (American) spellings
Co-Authored-By: Yuki Okushi <huyuumi.dev@gmail.com>
1 parent 75f60ec commit 12900c8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/backend/codegen.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ There are a few benefits to using LLVM:
4848
Once LLVM IR for all of the functions and statics, etc is built, it is time to
4949
start running LLVM and its optimization passes. LLVM IR is grouped into
5050
"modules". Multiple "modules" can be codegened at the same time to aid in
51-
multi-core utilisation. These "modules" are what we refer to as _codegen
52-
units_. These units were established way back during monomorphisation
51+
multi-core utilization. These "modules" are what we refer to as _codegen
52+
units_. These units were established way back during monomorphization
5353
collection phase.
5454

5555
Once LLVM produces objects from these modules, these objects are passed to the
5656
linker along with, optionally, the metadata object and an archive or an
5757
executable is produced.
5858

5959
It is not necessarily the codegen phase described above that runs the
60-
optimisations. With certain kinds of LTO, the optimisation might happen at the
61-
linking time instead. It is also possible for some optimisations to happen
60+
optimizations. With certain kinds of LTO, the optimization might happen at the
61+
linking time instead. It is also possible for some optimizations to happen
6262
before objects are passed on to the linker and some to happen during the
6363
linking.
6464

src/backend/lowering-mir.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Now that we have a list of symbols to generate from the collector, we need to
44
generate some sort of codegen IR. In this chapter, we will assume LLVM IR,
5-
since that's what rustc usually uses. The actual monomorphisation is performed
5+
since that's what rustc usually uses. The actual monomorphization is performed
66
as we go, while we do the translation.
77

88
Recall that the backend is started by
@@ -34,13 +34,13 @@ Before a function is translated a number of simple and primitive analysis
3434
passes will run to help us generate simpler and more efficient LLVM IR. An
3535
example of such an analysis pass would be figuring out which variables are
3636
SSA-like, so that we can translate them to SSA directly rather than relying on
37-
LLVM's `mem2reg` for those variables. The anayses can be found in
37+
LLVM's `mem2reg` for those variables. The analysis can be found in
3838
[`rustc_codegen_ssa::mir::analyze`][mirana].
3939

4040
[mirana]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/mir/analyze/index.html
4141

4242
Usually a single MIR basic block will map to a LLVM basic block, with very few
43-
exceptions: intrinsic or function calls and less basic MIR statemenets like
43+
exceptions: intrinsic or function calls and less basic MIR statements like
4444
`assert` can result in multiple basic blocks. This is a perfect lede into the
4545
non-portable LLVM-specific part of the code generation. Intrinsic generation is
4646
fairly easy to understand as it involves very few abstraction levels in between

src/backend/monomorph.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ fn main() {
4141
}
4242
```
4343

44-
The monomorphisation collector will give you a list of `[main, banana,
44+
The monomorphization collector will give you a list of `[main, banana,
4545
peach::<u64>]`. These are the functions that will have machine code generated
4646
for them. Collector will also add things like statics to that list.
4747

4848
See [the collector rustdocs][collect] for more info.
4949

5050
[collect]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/monomorphize/collector/index.html
5151

52-
The monomorphisation collector is run just before MIR lowering and codegen.
52+
The monomorphization collector is run just before MIR lowering and codegen.
5353
[`rustc_codegen_ssa::base::codegen_crate`][codegen1] calls the
54-
[`collect_and_partition_mono_items`][mono] query, which does monomorphisation
54+
[`collect_and_partition_mono_items`][mono] query, which does monomorphization
5555
collection and then partitions them into [codegen
5656
units](../appendix/glossary.md).
5757

@@ -60,7 +60,7 @@ units](../appendix/glossary.md).
6060

6161
## Polymorphization
6262

63-
As mentioned above, monomorphisation produces fast code, but it comes at the
63+
As mentioned above, monomorphization produces fast code, but it comes at the
6464
cost of compile time and binary size. [MIR
6565
optimizations](../mir/optimizations.md) can help a bit with this. Another
6666
optimization currently under development is called _polymorphization_.

0 commit comments

Comments
 (0)