rust/compiler/rustc_codegen_ssa
bors 4a7fb971c9 Auto merge of #91569 - erikdesjardins:vt-align, r=nikic
Attach range metadata to alignment loads from vtables

...because alignment is always nonzero[0].

This helps eliminate redundant runtime alignment checks, when a DST
is a field of a struct whose remaining fields have alignment 1.

Fixes #91438.

---
[0]:

The [reference](https://doc.rust-lang.org/reference/type-layout.html) says that alignment must be at least 1.

And in practice, the alignment field for all vtables is generated here: 772d51f887/compiler/rustc_middle/src/ty/vtable.rs (L68-L90) and is nonzero because [`Align::bytes()`](772d51f887/compiler/rustc_target/src/abi/mod.rs (L547-L549)) is always nonzero.
2021-12-13 04:29:20 +00:00
..
src Auto merge of #91569 - erikdesjardins:vt-align, r=nikic 2021-12-13 04:29:20 +00:00
Cargo.toml Use object crate for .rustc metadata generation 2021-12-07 09:39:05 +01:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.