Repository navigation
Remove TypeKind from rustc_codegen_ssa - #164924
Merged
Merged
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_codegen_llvm/src/builder/autodiff.rs cc @ZuseZ4 |
GuillaumeGomez
approved these changes
Oct 25, 2026
This comment has been minimized.
This comment has been minimized.
antoyo
reviewed
Oct 25, 2026
antoyo
reviewed
Oct 25, 2026
beetrees
force-pushed
the
no-ssa-type-kind
branch
from
October 25, 2026 21:06
7cabd70 to
6278fa6
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
|
The failure is a know issue currently being resolved: #164929 |
folkertdev
reviewed
Oct 25, 2026
antoyo
reviewed
Oct 25, 2026
beetrees
force-pushed
the
no-ssa-type-kind
branch
4 times, most recently
from
October 25, 2026 23:40
0b25baf to
4a47ac5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bjorn3
reviewed
Oct 26, 2026
bjorn3
reviewed
Oct 26, 2026
bjorn3
reviewed
Oct 26, 2026
beetrees
force-pushed
the
no-ssa-type-kind
branch
from
October 26, 2026 16:39
4a47ac5 to
02162e4
Compare
This comment has been minimized.
This comment has been minimized.
beetrees
force-pushed
the
no-ssa-type-kind
branch
from
October 26, 2026 19:35
02162e4 to
599ce90
Compare
Member
|
@bors r+ |
Contributor
This comment has been minimized.
This comment has been minimized.
beetrees
force-pushed
the
no-ssa-type-kind
branch
from
October 27, 2026 18:48
599ce90 to
7e1341e
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
Author
|
@bors r=bjorn3 |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 28, 2026
Remove `TypeKind` from `rustc_codegen_ssa` `TypeKind` is a very LLVM-shaped enum (e.g. there is a single `TypeKind::Integer` but multiple variants for floats because that's what LLVM does) - other backends (e.g. `rustc_codegen_gcc`) usually don't have a single call to get the required information and have to check for each variant individually, even though most callers only care if a type is one or at most a few variants. This PR removes `TypeKind` and `cx.type_kind()` from `rustc_codegen_ssa`, replacing them with `Option`-returning methods `int_width`, `float_type` and `vector_element_type_and_length`. cc @antoyo for `rustc_codegen_gcc` r? @bjorn3
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 29, 2026
Remove `TypeKind` from `rustc_codegen_ssa` `TypeKind` is a very LLVM-shaped enum (e.g. there is a single `TypeKind::Integer` but multiple variants for floats because that's what LLVM does) - other backends (e.g. `rustc_codegen_gcc`) usually don't have a single call to get the required information and have to check for each variant individually, even though most callers only care if a type is one or at most a few variants. This PR removes `TypeKind` and `cx.type_kind()` from `rustc_codegen_ssa`, replacing them with `Option`-returning methods `int_width`, `float_type` and `vector_element_type_and_length`. cc @antoyo for `rustc_codegen_gcc` r? @bjorn3
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…uwer Rollup of 23 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #165123 (Temporarily drop macos-26 jobs) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…uwer Rollup of 23 pull requests Successful merges: - #165032 (stdarch subtree update) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #165123 (Temporarily drop macos-26 jobs) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #164981 (Reflection add TypeId::name) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
…uwer Rollup of 22 pull requests Successful merges: - #165032 (stdarch subtree update) - #165123 (Temporarily drop macos-26 jobs) - #165072 (Submodule update of rustc-perf) - #144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - #162342 (More stdarch regression tests) - #163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - #164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - #164916 (CI: rfl: move job forward to Linux v7.3) - #164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - #164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - #165083 (Gate `z` inline asm template modifier) - #165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - #161131 (Check associated const binding types) - #161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - #164315 (make powerpc `Complex` ABI GCC-compatible) - #164476 (Avoid ICE on None from prepare_vtable_segments) - #165003 (follow up for global-alloc-reentry test) - #165020 (Bless mir-opt panic-abort tests) - #165066 (skip max_repr_align in Layout::eq_abi) - #165080 (Syntactically allow C-variadics in parenthesized argument lists) - #165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - #165082 (Remove stability note from `rust_splat`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 29, 2026
Rollup merge of #164924 - beetrees:no-ssa-type-kind, r=bjorn3 Remove `TypeKind` from `rustc_codegen_ssa` `TypeKind` is a very LLVM-shaped enum (e.g. there is a single `TypeKind::Integer` but multiple variants for floats because that's what LLVM does) - other backends (e.g. `rustc_codegen_gcc`) usually don't have a single call to get the required information and have to check for each variant individually, even though most callers only care if a type is one or at most a few variants. This PR removes `TypeKind` and `cx.type_kind()` from `rustc_codegen_ssa`, replacing them with `Option`-returning methods `int_width`, `float_type` and `vector_element_type_and_length`. cc @antoyo for `rustc_codegen_gcc` r? @bjorn3
hashcatHitman
pushed a commit
to hashcatHitman/miri
that referenced
this pull request
Oct 30, 2026
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#165032 (stdarch subtree update) - rust-lang/rust#165123 (Temporarily drop macos-26 jobs) - rust-lang/rust#165072 (Submodule update of rustc-perf) - rust-lang/rust#144090 (Make `IoSlice` and `IoSliceMut` methods unstably const) - rust-lang/rust#162342 (More stdarch regression tests) - rust-lang/rust#163909 (std: Test the exit behavior of `abort` and `abort_immediate`) - rust-lang/rust#164766 (Unstably introduce MVP edition migration lint `unmarked_unchecked_type_aliases` together with bikeshed attribute `#[rustc_unchecked_type_alias]`) - rust-lang/rust#164916 (CI: rfl: move job forward to Linux v7.3) - rust-lang/rust#164924 (Remove `TypeKind` from `rustc_codegen_ssa`) - rust-lang/rust#164969 (perf: avoid allocating HashSet in is_distinct check on small SwitchInts) - rust-lang/rust#165083 (Gate `z` inline asm template modifier) - rust-lang/rust#165087 (Fix flaky CI test `named_temp_file_new_creates_file`) - rust-lang/rust#161131 (Check associated const binding types) - rust-lang/rust#161418 (give next-solver's `evaluate_const` its own `try_evaluate_const` logic) - rust-lang/rust#164315 (make powerpc `Complex` ABI GCC-compatible) - rust-lang/rust#164476 (Avoid ICE on None from prepare_vtable_segments) - rust-lang/rust#165003 (follow up for global-alloc-reentry test) - rust-lang/rust#165020 (Bless mir-opt panic-abort tests) - rust-lang/rust#165066 (skip max_repr_align in Layout::eq_abi) - rust-lang/rust#165080 (Syntactically allow C-variadics in parenthesized argument lists) - rust-lang/rust#165081 (move `#[rustc_allow_const_fn_unstable]` attr check to attr parsing stage) - rust-lang/rust#165082 (Remove stability note from `rust_splat`)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
View all comments
TypeKindis a very LLVM-shaped enum (e.g. there is a singleTypeKind::Integerbut multiple variants for floats because that's what LLVM does) - other backends (e.g.rustc_codegen_gcc) usually don't have a single call to get the required information and have to check for each variant individually, even though most callers only care if a type is one or at most a few variants. This PR removesTypeKindandcx.type_kind()fromrustc_codegen_ssa, replacing them withOption-returning methodsint_width,float_typeandvector_element_type_and_length.cc @antoyo for
rustc_codegen_gccr? @bjorn3