-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and improve rustc_codegen_{llvm,ssa}
docs
#80323
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These docs were very out of date and misleading. They even said that they codegen'd the *AST*! For some reason, the `rustc_codegen_ssa::base` docs were exactly identical to the `rustc_codegen_llvm::base` docs. They didn't really make sense, because they had LLVM-specific information even though `rustc_codegen_ssa` is supposed to be somewhat generic. So I removed them as they were misleading.
camelid
added
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
A-codegen
Area: Code generation
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
labels
Dec 23, 2020
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Dec 23, 2020
@bors r+ rollup |
📌 Commit 5b32ab6 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 31, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Dec 31, 2020
Update and improve `rustc_codegen_{llvm,ssa}` docs Fixes rust-lang#75342. These docs were very out of date and misleading. They even said that they codegen'd the *AST*! For some reason, the `rustc_codegen_ssa::base` docs were exactly identical to the `rustc_codegen_llvm::base` docs. They didn't really make sense, because they had LLVM-specific information even though `rustc_codegen_ssa` is supposed to be somewhat generic. So I removed them as they were misleading. r? `@pnkfelix` maybe?
This was referenced Dec 31, 2020
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Dec 31, 2020
Update and improve `rustc_codegen_{llvm,ssa}` docs Fixes rust-lang#75342. These docs were very out of date and misleading. They even said that they codegen'd the *AST*! For some reason, the `rustc_codegen_ssa::base` docs were exactly identical to the `rustc_codegen_llvm::base` docs. They didn't really make sense, because they had LLVM-specific information even though `rustc_codegen_ssa` is supposed to be somewhat generic. So I removed them as they were misleading. r? ```@pnkfelix``` maybe?
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 1, 2021
Rollup of 8 pull requests Successful merges: - rust-lang#80323 (Update and improve `rustc_codegen_{llvm,ssa}` docs) - rust-lang#80368 (rustdoc: Render visibilities succinctly) - rust-lang#80514 (Fix broken ./x.py install) - rust-lang#80519 (Take type defaults into account in suggestions to reorder generic parameters) - rust-lang#80526 (Update LLVM) - rust-lang#80532 (remove unnecessary trailing semicolon from bootstrap) - rust-lang#80548 (FIx ICE on wf check for foreign fns) - rust-lang#80551 (support pattern as const parents in type_of) Failed merges: - rust-lang#80547 (In which we start to parse const generics defaults) r? `@ghost` `@rustbot` modify labels: rollup
camelid
commented
Jan 23, 2021
Comment on lines
-10
to
-14
//! * There's no way to find out the `Ty` type of a `Value`. Doing so | ||
//! would be "trying to get the eggs out of an omelette" (credit: | ||
//! pcwalton). You can, instead, find out its `llvm::Type` by calling `val_ty`, | ||
//! but one `llvm::Type` corresponds to many `Ty`s; for instance, `tup(int, int, | ||
//! int)` and `rec(x=int, y=int, z=int)` will have the same `llvm::Type`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I was just looking through what rustc looked like many years ago, and noticed that this comment was originally introduced 10 years ago (!!) in dba9cae as:
// * There's no way to find out the ty::t type of a ValueRef. Doing so
// would be "trying to get the eggs out of an omelette" (credit:
// pcwalton). You can, instead, find out its TypeRef by calling val_ty,
// but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
// int) and rec(x=int, y=int, z=int) will have the same TypeRef.
Quite some software archaeology there!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-codegen
Area: Code generation
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #75342.
These docs were very out of date and misleading. They even said that
they codegen'd the AST!
For some reason, the
rustc_codegen_ssa::base
docs were exactlyidentical to the
rustc_codegen_llvm::base
docs. They didn't reallymake sense, because they had LLVM-specific information even though
rustc_codegen_ssa
is supposed to be somewhat generic. So I removedthem as they were misleading.
r? @pnkfelix maybe?