mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 21:16:27 +03:00
23a3312d92
Stop needing materialized places for most intrinsics Today even to return a constant from `size_of_val` it takes an `alloca`. That's wasteful. This updates the cg_ssa traits to allow returning an `OperandValue` instead, which is possible for the vast majority of intrinsics -- this PR moves all but 5 over to doing that in LLVM. The first commit adds a test to help show the difference here. cc https://github.com/rust-lang/compiler-team/issues/970 https://github.com/rust-lang/rust/issues/153250
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.