Skip to content

Remove type_array from rustc_codegen_ssa - #164926

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
beetrees:no-ssa-array
Oct 26, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
beetrees:no-ssa-array

Conversation

@beetrees

@beetrees beetrees commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

It's unused outside of rustc_codegen_llvm/rustc_codegen_gcc, and shouldn't be used in future in rustc_codegen_ssa to help allow backends that don't support immediate aggregate types to use rustc_codegen_ssa in the future.

@rustbot

rustbot commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 25, 2026
@rustbot

rustbot commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 19 candidates

@folkertdev

Copy link
Copy Markdown
Contributor

to allow backends to not support aggregate types in the future.

Is there some missing context here? Is that a GPU thing or something?

@beetrees

beetrees commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Backend (e.g. LLVM) types are different the Rust types, and are usually scalars. LLVM also supports basic array and struct types, but some codegen backends like Cranelift don't support aggregates as immediate backend types at all. This is part of the reason why rustc_codegen_cranelift doesn't currently use most of rustc_codegen_ssa - as rustc_codegen_ssa is modelled around the LLVM backend it assumes that the backend has immediate struct types.

The wording in the PR description was definitely ambiguous - I've updated it to be more explicit.

@folkertdev

Copy link
Copy Markdown
Contributor

Ok, makes sense, LGTM

r? me

@bors r+ rollup

@rust-bors

rust-bors Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cafe6b8 has been approved by folkertdev

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 Oct 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
Rollup of 6 pull requests

Successful merges:

 - #164617 (tools: remote-test-server: Fix UEFI crash return code)
 - #164549 (feat!: change return type of `TryFromIntError::kind`)
 - #164893 (Add diagnostic items for env::vars / env::vars_os)
 - #164897 (Add regression test for CoerceShared impl with unnormalizable target)
 - #164908 (Add regression test for self referential inherent associated type ICE)
 - #164926 (Remove `type_array` from `rustc_codegen_ssa`)
@rust-bors
rust-bors Bot merged commit ed9f34a into rust-lang:main Oct 26, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
Rollup merge of #164926 - beetrees:no-ssa-array, r=folkertdev

Remove `type_array` from `rustc_codegen_ssa`

It's unused outside of `rustc_codegen_llvm`/`rustc_codegen_gcc`, and shouldn't be used in future in `rustc_codegen_ssa` to help allow backends that don't support immediate aggregate types to use `rustc_codegen_ssa` in the future.
@beetrees
beetrees deleted the no-ssa-array branch October 26, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

4 participants