Skip to content

Conversation

camelid
Copy link
Member

@camelid camelid commented Dec 23, 2020

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 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?

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 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 rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 23, 2020
@nagisa
Copy link
Member

nagisa commented Dec 31, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 31, 2020

📌 Commit 5b32ab6 has been approved by nagisa

@bors 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
@bors bors merged commit 55cfcd5 into rust-lang:master Jan 1, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 1, 2021
@camelid camelid deleted the codegen-base-docs branch January 1, 2021 18:21
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`.
Copy link
Member Author

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs are out of date for rustc_codegen_llvm

6 participants