rust/compiler/rustc_codegen_gcc/src
bors ecb867ec3c Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
Clarify `Layout` interning.

`Layout` is another type that is sometimes interned, sometimes not, and
we always use references to refer to it so we can't take any advantage
of the uniqueness properties for hashing or equality checks.

This commit renames `Layout` as `LayoutS`, and then introduces a new
`Layout` that is a newtype around an `Interned<LayoutS>`. It also
interns more layouts than before. Previously layouts within layouts
(via the `variants` field) were never interned, but now they are. Hence
the lifetime on the new `Layout` type.

Unlike other interned types, these ones are in `rustc_target` instead of
`rustc_middle`. This reflects the existing structure of the code, which
does layout-specific stuff in `rustc_target` while `TyAndLayout` is
generic over the `Ty`, allowing the type-specific stuff to occur in
`rustc_middle`.

The commit also adds a `HashStable` impl for `Interned`, which was
needed. It hashes the contents, unlike the `Hash` impl which hashes the
pointer.

r? `@fee1-dead`
2022-03-07 15:25:42 +00:00
..
back Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31 2021-12-31 16:26:32 +01:00
intrinsic Clarify Layout interning. 2022-03-07 13:41:47 +11:00
abi.rs Auto merge of #91003 - psumbera:sparc64-abi, r=nagisa 2021-12-02 02:59:44 +00:00
allocator.rs Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen 2021-09-17 17:52:40 -04:00
archive.rs Unconditionally update symbols 2022-02-10 18:27:18 +01:00
asm.rs Add preliminary support for inline assembly for msp430. 2022-01-22 23:42:46 -05:00
base.rs Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31 2021-12-31 16:26:32 +01:00
builder.rs all: fix some typos 2022-03-03 19:47:23 +08:00
callee.rs Merge commit '9809f5d21990d9e24b3e9876ea7da756fd4e9def' into libgccjit-codegen 2021-09-28 09:19:11 -04:00
common.rs Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa 2022-03-07 02:07:36 +00:00
consts.rs Introduce ConstAllocation. 2022-03-07 08:25:50 +11:00
context.rs cleanup: remove unused ability to have LLVM null-terminate const strings 2022-03-06 12:28:46 -05:00
coverageinfo.rs Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegen 2021-08-15 08:29:07 -04:00
debuginfo.rs Create more accurate debuginfo for vtables. 2021-10-08 10:33:47 +02:00
declare.rs Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
lib.rs rename ErrorReported -> ErrorGuaranteed 2022-03-02 09:45:25 -06:00
mono_item.rs Merge commit '9809f5d21990d9e24b3e9876ea7da756fd4e9def' into libgccjit-codegen 2021-09-28 09:19:11 -04:00
type_.rs Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31 2021-12-31 16:26:32 +01:00
type_of.rs Move ty::print methods to Drop-based scope guards 2022-02-16 17:24:23 -05:00