diff options
| author | bors <bors@rust-lang.org> | 2023-08-04 07:17:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-04 07:17:02 +0000 |
| commit | 73dc6f03a2a8c0e8b8b25fb97d7f4805995ce0b9 (patch) | |
| tree | f4a929507f1af1168a0078249311449178436124 /compiler/rustc_codegen_llvm/src | |
| parent | 098c1db7e55e7229a520a2ec8e460e1e300e109b (diff) | |
| parent | 1d7f728901090e3343e9c284886f9983a052edef (diff) | |
| download | rust-73dc6f03a2a8c0e8b8b25fb97d7f4805995ce0b9.tar.gz rust-73dc6f03a2a8c0e8b8b25fb97d7f4805995ce0b9.zip | |
Auto merge of #114350 - erikdesjardins:ident, r=tmiasko
cg_llvm: stop identifying ADTs in LLVM IR
This is an extension of https://github.com/rust-lang/rust/pull/94107. It may be a minor perf win.
Fixes #96242.
Now that we use opaque pointers, ADTs can no longer be recursive, so we
do not need to name them. Previously, this would be necessary if you had
a struct like
```rs
struct Foo(Box<Foo>, u64, u64);
```
which would be represented with something like
```ll
%Foo = type { %Foo*, i64, i64 }
```
which is now just
```ll
{ ptr, i64, i64 }
```
r? `@tmiasko`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/type_of.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index 32e71c6a641..2be7bce115d 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -61,9 +61,6 @@ fn uncached_llvm_type<'a, 'tcx>( } Some(name) } - // Use identified structure types for ADT. Due to pointee types in LLVM IR their definition - // might be recursive. Other cases are non-recursive and we can use literal structure types. - ty::Adt(..) => Some(String::new()), _ => None, }; |
