Skip to content

Commit 73dc6f0

Browse files
committed
Auto merge of #114350 - erikdesjardins:ident, r=tmiasko
cg_llvm: stop identifying ADTs in LLVM IR This is an extension of #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`
2 parents 098c1db + 1d7f728 commit 73dc6f0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

compiler/rustc_codegen_llvm/src/type_of.rs

-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ fn uncached_llvm_type<'a, 'tcx>(
6161
}
6262
Some(name)
6363
}
64-
// Use identified structure types for ADT. Due to pointee types in LLVM IR their definition
65-
// might be recursive. Other cases are non-recursive and we can use literal structure types.
66-
ty::Adt(..) => Some(String::new()),
6764
_ => None,
6865
};
6966

0 commit comments

Comments
 (0)