rust/library
Andreas Molzer e44784b875 Assume slice len is bounded by allocation size
Uses assume to check the length against a constant upper bound. The
inlined result then informs the optimizer of the sound value range.

This was tried with unreachable_unchecked before which introduces a
branch. This has the advantage of not being executed in sound code but
complicates basic blocks. It resulted in ~2% increased compile time in
some worst cases.

Add a codegen test for the assumption, testing the issue from #67186
2020-10-04 20:43:36 +02:00
..
alloc Auto merge of #77253 - jyn514:crate-link, r=Manishearth 2020-09-29 12:11:17 +00:00
backtrace@4083a90168 std: Switch from libbacktrace to gimli 2020-07-28 16:34:01 -07:00
core Assume slice len is bounded by allocation size 2020-10-04 20:43:36 +02:00
panic_abort Rollup merge of #76866 - est31:master, r=lcnr 2020-09-20 15:51:50 +02:00
panic_unwind library/{panic_,}unwind: Add definitions for sparc-unknow-linux-gnu 2020-09-28 00:39:57 +02:00
proc_macro Add a feature gate for basic function pointer use in const fn 2020-09-27 10:46:41 -07:00
profiler_builtins Fix warning whe building profiler_builtins crate 2020-09-04 15:10:29 +02:00
rtstartup mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-alloc mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-core mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-std mv std libs to library/ 2020-07-27 19:51:13 -05:00
std Auto merge of #77292 - lzutao:std_asm, r=Amanieu 2020-09-30 05:27:16 +00:00
stdarch@b422b0180f fix redundant delarations of const_fn_transmute 2020-09-27 15:13:32 +08:00
term mv std libs to library/ 2020-07-27 19:51:13 -05:00
test Rollup merge of #77009 - est31:dogfood_total_cmp, r=lcnr 2020-09-21 15:30:49 +02:00
unwind library/{panic_,}unwind: Add definitions for sparc-unknow-linux-gnu 2020-09-28 00:39:57 +02:00