From cc50f978e16517bfda5b428bdf61a7cdd27b92f6 Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Sat, 7 Mar 2020 14:58:39 -0600 Subject: [PATCH] skeleton for backend chapters --- src/SUMMARY.md | 17 ++++++++++------- src/{codegen => backend}/backend-agnostic.md | 0 src/backend/backend.md | 1 + src/{ => backend}/codegen.md | 2 +- src/{codegen => backend}/debugging.md | 2 +- src/backend/lowering-mir.md | 0 src/backend/monomorph.md | 1 + src/{codegen => backend}/updating-llvm.md | 0 src/compiler-debugging.md | 5 ++--- src/ice-breaker/llvm.md | 2 +- 10 files changed, 17 insertions(+), 13 deletions(-) rename src/{codegen => backend}/backend-agnostic.md (100%) create mode 100644 src/backend/backend.md rename src/{ => backend}/codegen.md (98%) rename src/{codegen => backend}/debugging.md (99%) create mode 100644 src/backend/lowering-mir.md create mode 100644 src/backend/monomorph.md rename src/{codegen => backend}/updating-llvm.md (100%) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index ae1ea0b2..7cc41e0b 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -101,13 +101,16 @@ - [Constant evaluation](./const-eval.md) - [miri const evaluator](./miri.md) - [Parameter Environments](./param_env.md) - - [Code Generation](./codegen.md) - - [Updating LLVM](./codegen/updating-llvm.md) - - [Debugging LLVM](./codegen/debugging.md) - - [Backend Agnostic Codegen](./codegen/backend-agnostic.md) - - [Profile-guided Optimization](./profile-guided-optimization.md) - - [Sanitizers Support](./sanitizers.md) - - [Debugging Support in Rust Compiler](./debugging-support-in-rustc.md) + - [Compiler Backend](./backend/backend.md) + - [Monomorphization](./backend/monomorph.md) + - [Lowering MIR](./backend/lowering-mir.md) + - [Code Generation](./backend/codegen.md) + - [Updating LLVM](./backend/updating-llvm.md) + - [Debugging LLVM](./backend/debugging.md) + - [Backend Agnostic Codegen](./backend/backend-agnostic.md) + - [Profile-guided Optimization](./profile-guided-optimization.md) + - [Sanitizers Support](./sanitizers.md) + - [Debugging Support in Rust Compiler](./debugging-support-in-rustc.md) --- diff --git a/src/codegen/backend-agnostic.md b/src/backend/backend-agnostic.md similarity index 100% rename from src/codegen/backend-agnostic.md rename to src/backend/backend-agnostic.md diff --git a/src/backend/backend.md b/src/backend/backend.md new file mode 100644 index 00000000..167391a8 --- /dev/null +++ b/src/backend/backend.md @@ -0,0 +1 @@ +# The Compiler Backend diff --git a/src/codegen.md b/src/backend/codegen.md similarity index 98% rename from src/codegen.md rename to src/backend/codegen.md index c7d2fc07..02bb4d57 100644 --- a/src/codegen.md +++ b/src/backend/codegen.md @@ -6,7 +6,7 @@ generates an executable binary. rustc uses LLVM for code generation. > NOTE: If you are looking for hints on how to debug code generation bugs, > please see [this section of the debugging chapter][debugging]. -[debugging]: codegen/debugging.html +[debugging]: ./debugging.md ## What is LLVM? diff --git a/src/codegen/debugging.md b/src/backend/debugging.md similarity index 99% rename from src/codegen/debugging.md rename to src/backend/debugging.md index 0da29bfb..06e62d9e 100644 --- a/src/codegen/debugging.md +++ b/src/backend/debugging.md @@ -3,7 +3,7 @@ > NOTE: If you are looking for info about code generation, please see [this > chapter][codegen] instead. -[codegen]: ../codegen.md +[codegen]: ./codegen.md This section is about debugging compiler bugs in code generation (e.g. why the compiler generated some piece of code or crashed in LLVM). LLVM is a big diff --git a/src/backend/lowering-mir.md b/src/backend/lowering-mir.md new file mode 100644 index 00000000..e69de29b diff --git a/src/backend/monomorph.md b/src/backend/monomorph.md new file mode 100644 index 00000000..fc54886f --- /dev/null +++ b/src/backend/monomorph.md @@ -0,0 +1 @@ +# Monomorphization diff --git a/src/codegen/updating-llvm.md b/src/backend/updating-llvm.md similarity index 100% rename from src/codegen/updating-llvm.md rename to src/backend/updating-llvm.md diff --git a/src/compiler-debugging.md b/src/compiler-debugging.md index 736de977..08e9417b 100644 --- a/src/compiler-debugging.md +++ b/src/compiler-debugging.md @@ -4,9 +4,8 @@ This chapter contains a few tips to debug the compiler. These tips aim to be useful no matter what you are working on. Some of the other chapters have advice about specific parts of the compiler (e.g. the [Queries Debugging and -Testing -chapter](./incrcomp-debugging.html) or -the [LLVM Debugging chapter](./codegen/debugging.md)). +Testing chapter](./incrcomp-debugging.html) or the [LLVM Debugging +chapter](./backend/debugging.md)). ## `-Z` flags diff --git a/src/ice-breaker/llvm.md b/src/ice-breaker/llvm.md index 8a8ef411..a6291a8c 100644 --- a/src/ice-breaker/llvm.md +++ b/src/ice-breaker/llvm.md @@ -23,7 +23,7 @@ it useful to look at the various codegen options listed under `-Chelp` and the internal options under `-Zhelp` -- there are a number that pertain to LLVM (just search for LLVM). -[d]: ../codegen/debugging.md +[d]: ../backend/debugging.md ## If you do narrow to an LLVM bug