]> git.lizzy.rs Git - rust.git/commit
rustc: Allow targets to specify SIMD args are by-val
authorAlex Crichton <alex@alexcrichton.com>
Sat, 13 Oct 2018 00:04:31 +0000 (17:04 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 13 Oct 2018 00:04:31 +0000 (17:04 -0700)
commit9562b69b4f270a824b9f54203ed69427f8833fe9
tree856d17110c72437caf09feebe58a8a9b63f81933
parent945372d26818f93d6f5cded7b751749e280b67bf
rustc: Allow targets to specify SIMD args are by-val

The upcoming SIMD support in the wasm target is unique from the other
platforms where it's either unconditionally available or not available,
there's no halfway where a subsection of the program can use it but no
other parts of the program can use it. In this world it's valid for wasm
SIMD args to always be passed by value and there's no need to pass them
by reference.

This commit adds a new custom target specification option
`simd_types_indirect` which defaults to `true`, but the wasm backend
disables this and sets it to `false`.
src/librustc_codegen_llvm/abi.rs
src/librustc_target/spec/mod.rs
src/librustc_target/spec/wasm32_unknown_unknown.rs