File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
33In the future, it would be nice to allow other codegen backends (e.g.
44[ Cranelift] ). To this end, ` librustc_codegen_ssa ` provides an
5- abstract interface for all backends to implenent .
5+ abstract interface for all backends to implement .
66
77[ Cranelift ] : https://github.com/bytecodealliance/wasmtime/tree/master/cranelift
88
@@ -175,7 +175,7 @@ in the LLVM implementation of the trait).
175175
176176The traits offer an API which is very similar to the API of LLVM. This is not
177177the best solution since LLVM has a very special way of doing things: when
178- addding another backend, the traits definition might be changed in order to
178+ adding another backend, the traits definition might be changed in order to
179179offer more flexibility.
180180
181181However, the current separation between backend-agnostic and LLVM-specific code
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ tutorial above):
117117- The ` -Cno-prepopulate-passes ` will avoid pre-populate the LLVM pass
118118 manager with a list of passes. This will allow you to view the LLVM
119119 IR that rustc generates, not the LLVM IR after optimizations.
120- - The ` -Cpasses=val ` option allows you to supply a ( space seprated) list of extra LLVM passes to run
120+ - The ` -Cpasses=val ` option allows you to supply a space separated list of extra LLVM passes to run
121121- The ` -Csave-temps ` option saves all temporary output files during compilation
122122- The ` -Zprint-llvm-passes ` option will print out LLVM optimization passes being run
123123- The ` -Ztime-llvm-passes ` option measures the time of each LLVM pass
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ the approach: as we grow the stack down we pass an additional argument to calls
8484rather than walking up the stack when the intrinsic is called. That additional argument can be
8585returned wherever the caller location is queried.
8686
87- The argument we append is of type ` &'static core::panic::Location<'staic > ` . A reference was chosen
87+ The argument we append is of type ` &'static core::panic::Location<'static > ` . A reference was chosen
8888to avoid unnecessary copying because a pointer is a third the size of
8989` std::mem::size_of::<core::panic::Location>() == 24 ` at time of writing.
9090
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ 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
41-
41+
4242Usually a single MIR basic block will map to a LLVM basic block, with very few
4343exceptions: 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
You can’t perform that action at this time.
0 commit comments