line length
This commit is contained in:
parent
d7cd4780eb
commit
96f8893e57
|
|
@ -1,7 +1,7 @@
|
||||||
# Code generation
|
# Code generation
|
||||||
|
|
||||||
Code generation or "codegen" is the part of the compiler that actually generates
|
Code generation or "codegen" is the part of the compiler that actually
|
||||||
an executable binary. rustc uses LLVM for code generation.
|
generates an executable binary. rustc uses LLVM for code generation.
|
||||||
|
|
||||||
## What is LLVM?
|
## What is LLVM?
|
||||||
|
|
||||||
|
|
@ -24,8 +24,9 @@ many compiler projects, including the `clang` C compiler and our beloved
|
||||||
|
|
||||||
LLVM's "format `X`" is called LLVM IR. It is basically assembly code with
|
LLVM's "format `X`" is called LLVM IR. It is basically assembly code with
|
||||||
additional low-level types and annotations added. These annotations are helpful
|
additional low-level types and annotations added. These annotations are helpful
|
||||||
for doing optimizations on the LLVM IR and outputed machine code. The end result
|
for doing optimizations on the LLVM IR and outputed machine code. The end
|
||||||
of all this is (at long last) something executable (e.g. an ELF object or wasm).
|
result of all this is (at long last) something executable (e.g. an ELF object
|
||||||
|
or wasm).
|
||||||
|
|
||||||
There are a few benefits to using LLVM:
|
There are a few benefits to using LLVM:
|
||||||
|
|
||||||
|
|
@ -38,8 +39,8 @@ There are a few benefits to using LLVM:
|
||||||
clang, and a bunch of other languages were able to compile to wasm! (Well,
|
clang, and a bunch of other languages were able to compile to wasm! (Well,
|
||||||
there was some extra stuff to be done, but we were 90% there anyway).
|
there was some extra stuff to be done, but we were 90% there anyway).
|
||||||
- We and other compiler projects benefit from each other. For example, when the
|
- We and other compiler projects benefit from each other. For example, when the
|
||||||
[Spectre and Meltdown security vulnerabilities][spectre] were discovered, only LLVM
|
[Spectre and Meltdown security vulnerabilities][spectre] were discovered,
|
||||||
needed to be patched.
|
only LLVM needed to be patched.
|
||||||
|
|
||||||
[spectre]: https://meltdownattack.com/
|
[spectre]: https://meltdownattack.com/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue