about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-06-15 12:02:03 +0900
committerGitHub <noreply@github.com>2022-06-15 12:02:03 +0900
commit2722c2aa33d947789904694fcde4bb556e278952 (patch)
treedbb096fb235cfcfd2dec11c22e48e0ee271ef318 /compiler/rustc_codegen_llvm/src/builder.rs
parentbb4805118a6274a83e21c78bb96e3cbd9e9dca36 (diff)
parent50f6a9ed87e47c7a8ff6aefcde01a33821e80e20 (diff)
downloadrust-2722c2aa33d947789904694fcde4bb556e278952.tar.gz
rust-2722c2aa33d947789904694fcde4bb556e278952.zip
Rollup merge of #98078 - erikdesjardins:uncheckedsize, r=petrochenkov
Use unchecked mul to compute slice sizes

This allows LLVM to realize that `slice.len() > 0` iff `slice.len() * size_of::<T>() > 0`, allowing a branch on the latter to be folded into the former when dropping vecs and boxed slices, in some cases.

Fixes (partially) #96497
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions