Closed
Description
This is an extension of #94107. It may be a minor perf win.
Basically, when we switch to using opaque pointers, this comment will no longer be true:
rust/compiler/rustc_codegen_llvm/src/type_of.rs
Lines 67 to 69 in 27af517
@rustbot label A-llvm T-compiler S-blocked
Edit: the simplest implementation, e.g. changing those lines to
// In LLVM < 15, 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.
// In LLVM 15, we use opaque pointers, so there are no pointee types and no potential recursion.
ty::Adt(..) if get_version() < (15, 0, 0) => Some(String::new()),
doesn't work because then we end up infinitely recursing into the pointee type in order to generate a literal struct type. (Removing pointee types from the codegen backend would avoid this, which I am working on.)