]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #87916 - nbdd0121:black_box, r=nagisa
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 12 Aug 2021 17:04:07 +0000 (10:04 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Aug 2021 17:04:07 +0000 (10:04 -0700)
commitdf23264f8043ee82e3f977ee46c38651fb6282fc
tree1ed846f5e8239540857fbda3563714cf24cd9c92
parent4498e300e41f47c75abe4e49ec91ae949aaeea5f
parent1fb1643129f9ac6a63bddf04d69e28632615c0df
Rollup merge of #87916 - nbdd0121:black_box, r=nagisa

Implement `black_box` using intrinsic

Introduce `black_box` intrinsic, as suggested in https://github.com/rust-lang/rust/pull/87590#discussion_r680468700.

This is still codegenned as empty inline assembly for LLVM. For MIR interpretation and cranelift it's treated as identity.

cc `@Amanieu` as this is related to inline assembly
cc `@bjorn3` for rustc_codegen_cranelift changes
cc `@RalfJung` as this affects MIRI

r? `@nagisa` I suppose