mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
028e2600c9
Use ptradd for vtable indexing Extension of #121665. After this, the only remaining usages of GEP are [this](https://github.com/rust-lang/rust/blob/cd81f5b27ee00b49d413db50b5e6af871cebcf23/compiler/rustc_codegen_llvm/src/intrinsic.rs#L909-L920) kinda janky Emscription EH code, which I'll change in a future PR, and array indexing / pointer offsets, where there isn't yet a canonical `ptradd` form. (Out of curiosity I tried converting the latter to `ptradd(ptr, mul(size, index))`, but that causes codegen regressions right now.) r? `@nikic`
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.