diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-02-06 11:57:11 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-02-06 12:50:28 +1100 |
| commit | f2871a9ce552cd21b1c7b8df69eefe06af6d59da (patch) | |
| tree | 5e7afb1fbe7aca6c987680ad01b6012ba10b6276 /src/librustc/mir | |
| parent | 8ae730a442cc8af6a487a137ae9ba78f89edbba6 (diff) | |
| download | rust-f2871a9ce552cd21b1c7b8df69eefe06af6d59da.tar.gz rust-f2871a9ce552cd21b1c7b8df69eefe06af6d59da.zip | |
Make `intern_lazy_const` actually intern its argument.
Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
Diffstat (limited to 'src/librustc/mir')
| -rw-r--r-- | src/librustc/mir/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 82083b4f699..eca01d78c2a 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -2154,7 +2154,7 @@ impl<'tcx> Operand<'tcx> { span, ty, user_ty: None, - literal: tcx.intern_lazy_const( + literal: tcx.mk_lazy_const( ty::LazyConst::Evaluated(ty::Const::zero_sized(ty)), ), }) |
