summaryrefslogtreecommitdiffstats
path: root/src/doc/rustc-dev-guide/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/rustc-dev-guide/src/backend')
-rw-r--r--src/doc/rustc-dev-guide/src/backend/backend-agnostic.md5
-rw-r--r--src/doc/rustc-dev-guide/src/backend/codegen.md19
-rw-r--r--src/doc/rustc-dev-guide/src/backend/updating-llvm.md18
3 files changed, 21 insertions, 21 deletions
diff --git a/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md b/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
index 271e6a16f..ea50cd754 100644
--- a/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
+++ b/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
@@ -2,15 +2,12 @@
<!-- toc -->
-As of <!-- date: 2021-10 --> October 2021, `rustc_codegen_ssa` provides an
+As of <!-- date-check --> Aug 2022, `rustc_codegen_ssa` provides an
abstract interface for all backends to implement, to allow other codegen
backends (e.g. [Cranelift]).
[Cranelift]: https://github.com/bytecodealliance/wasmtime/tree/HEAD/cranelift
-> The following is a copy/paste of a README from the rust-lang/rust repo.
-> Please submit a PR if it needs updating.
-
# Refactoring of `rustc_codegen_llvm`
by Denis Merigoux, October 23rd 2018
diff --git a/src/doc/rustc-dev-guide/src/backend/codegen.md b/src/doc/rustc-dev-guide/src/backend/codegen.md
index 1a6c2fa76..5feea5202 100644
--- a/src/doc/rustc-dev-guide/src/backend/codegen.md
+++ b/src/doc/rustc-dev-guide/src/backend/codegen.md
@@ -1,13 +1,16 @@
# Code generation
-Code generation or "codegen" is the part of the compiler that actually
-generates an executable binary. Usually, rustc uses LLVM for code generation;
-there is also support for [Cranelift]. The key is that rustc doesn't implement
-codegen itself. It's worth noting, though, that in the Rust source code, many
-parts of the backend have `codegen` in their names (there are no hard
-boundaries).
-
-[Cranelift]: https://github.com/bytecodealliance/wasmtime/tree/HEAD/cranelift
+Code generation (or "codegen") is the part of the compiler
+that actually generates an executable binary.
+Usually, rustc uses LLVM for code generation,
+bu there is also support for [Cranelift] and [GCC].
+The key is that rustc doesn't implement codegen itself.
+It's worth noting, though, that in the Rust source code,
+many parts of the backend have `codegen` in their names
+(there are no hard boundaries).
+
+[Cranelift]: https://github.com/bytecodealliance/wasmtime/tree/main/cranelift
+[GCC]: https://github.com/rust-lang/rustc_codegen_gcc
> NOTE: If you are looking for hints on how to debug code generation bugs,
> please see [this section of the debugging chapter][debugging].
diff --git a/src/doc/rustc-dev-guide/src/backend/updating-llvm.md b/src/doc/rustc-dev-guide/src/backend/updating-llvm.md
index 0de0767b6..81ebbbb40 100644
--- a/src/doc/rustc-dev-guide/src/backend/updating-llvm.md
+++ b/src/doc/rustc-dev-guide/src/backend/updating-llvm.md
@@ -43,7 +43,7 @@ the branch we're already using. The steps for this are:
1. Make sure the bugfix is in upstream LLVM.
2. Identify the branch that rustc is currently using. The `src/llvm-project`
submodule is always pinned to a branch of the
- [rust-lang/llvm-project](https://github.com/rust-lang/llvm-project) repository.
+ [rust-lang/llvm-project repository].
3. Fork the rust-lang/llvm-project repository
4. Check out the appropriate branch (typically named `rustc/a.b-yyyy-mm-dd`)
5. Cherry-pick the upstream commit onto the branch
@@ -66,8 +66,8 @@ Example PRs look like:
## Feature updates
-> Note that this information is as of the time of this writing <!-- date:
-2021-10 --> (October 2021). The process for updating LLVM changes with
+> Note that this information is as of the time of this writing, <!--
+date-check --> October 2021. The process for updating LLVM changes with
practically all LLVM updates, so this may be out of date!
Unlike bugfixes, updating to pick up a new feature of LLVM typically requires a
@@ -146,9 +146,6 @@ easiest to land [`llvm-wrapper`] compatibility as a PR before actually updating
interested in trying out the new LLVM can benefit from work you've done to
update the C++ bindings.
-[rust-lang/llvm-project repository]: https://github.com/rust-lang/llvm-project
-[`llvm-wrapper`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper
-
### Caveats and gotchas
Ideally the above instructions are pretty smooth, but here's some caveats to
@@ -161,8 +158,6 @@ keep in mind while going through them:
* Creating branches is a privileged operation on GitHub, so you'll need someone
with write access to create the branches for you most likely.
-[wg-llvm]: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm
-
## New LLVM Release Updates
Updating to a new release of LLVM is very similar to the "feature updates"
@@ -172,7 +167,7 @@ section above is generally around branch naming. The sequence of events
typically looks like:
1. LLVM announces that its latest release version has branched. This will show
- up as a branch in https://github.com/llvm/llvm-project typically named
+ up as a branch in the [llvm/llvm-project repository] typically named
`release/$N.x` where `$N` is the version of LLVM that's being released.
2. We then follow the "feature updates" section above to create a new branch of
@@ -192,3 +187,8 @@ typically looks like:
to create a new branch in the rust-lang/llvm-project repository, this time
with a new date. The commit history should look much cleaner as just a few
Rust-specific commits stacked on top of stock LLVM's release branch.
+
+[rust-lang/llvm-project repository]: https://github.com/rust-lang/llvm-project
+[llvm/llvm-project repository]: https://github.com/llvm/llvm-project
+[`llvm-wrapper`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper
+[wg-llvm]: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm