]> git.lizzy.rs Git - rust.git/commit
Auto merge of #74821 - oli-obk:const_eval_read_uninit_fast_path, r=wesleywiser
authorbors <bors@rust-lang.org>
Fri, 7 Aug 2020 15:28:07 +0000 (15:28 +0000)
committerbors <bors@rust-lang.org>
Fri, 7 Aug 2020 15:28:07 +0000 (15:28 +0000)
commit4d4342347b71313258a46e506ee0a258f365185c
tree0212ce1a45182b9047ddb73e9c83e0758af7fcd6
parent64f99b4cfbf01c8fda1d4fe16e9b37b11096b7c3
parent1864a973b3a0a5a6c5a7c71d7d7cd052732e5c02
Auto merge of #74821 - oli-obk:const_eval_read_uninit_fast_path, r=wesleywiser

Check whether locals are too large instead of whether accesses into them are too large

Essentially this stops const prop from attempting to optimize

```rust
let mut x = [0_u8; 5000];
x[42] = 3;
```

I don't expect this to be a perf improvement without #73656 (which is also where the lack of this PR will be a perf regression).

r? @wesleywiser
src/librustc_mir/transform/const_prop.rs
src/tools/compiletest/src/runtest.rs