about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-14 22:05:54 +0000
committerbors <bors@rust-lang.org>2020-11-14 22:05:54 +0000
commit361c4ea22486557ec50c4fc6a93d60e7476ecbea (patch)
tree9fba4336307a3b48ec2c6fe6bd13294fbf29d49c /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent98d66340d6e63eda115afc8b0da1d87965881936 (diff)
parent69032733392c57e02d6d7167c76006d46c748b5f (diff)
downloadrust-361c4ea22486557ec50c4fc6a93d60e7476ecbea.tar.gz
rust-361c4ea22486557ec50c4fc6a93d60e7476ecbea.zip
Auto merge of #79049 - tmiasko:lower-intrinsics, r=jonas-schievink
Lower intrinsics calls: forget, size_of, unreachable, wrapping_*

This allows constant propagation to evaluate `size_of` and `wrapping_*`,
and unreachable propagation to propagate a call to `unreachable`.

The lowering is performed as a MIR optimization, rather than during MIR
building to preserve the special status of intrinsics with respect to
unsafety checks and promotion.

Currently enabled by default to determine the performance impact (no
significant impact expected). In practice only useful when combined with
inlining since intrinsics are rarely used directly (with exception of
`unreachable` and `discriminant_value` used by built-in derive macros).

Closes #32716.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions