diff options
| author | bors <bors@rust-lang.org> | 2017-05-23 07:14:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-05-23 07:14:42 +0000 |
| commit | 9fa25a7df3a1101a1dac611f3e45fa5b09836d27 (patch) | |
| tree | 244059017b067ceb95421acdf461e8a12ede27d5 /src/rustllvm/RustWrapper.cpp | |
| parent | 852b7cb91ed44f6cc77f855bd8281da4accbd2fb (diff) | |
| parent | 83641a9b6d2a622f5705ab76152cffb41d60fa3a (diff) | |
| download | rust-9fa25a7df3a1101a1dac611f3e45fa5b09836d27.tar.gz rust-9fa25a7df3a1101a1dac611f3e45fa5b09836d27.zip | |
Auto merge of #42015 - nikomatsakis:chalk-trait-env-2, r=eddyb
remove interior mutability of type-flags We were previously using the flags on `Ty<'tcx>` instances to do some ad-hoc caching schemes around things like `is_sized()`, `is_freeze()`, and `moves_by_default()`. This PR replaces those schemes with a proper query; the query key is based on the pair of a `(ParameterEnvironment<'tcx>, Ty<'tcx>)` pair. This is also intended to be a preliminary template for what trait-selection and projection will eventually look like. I did some performance measurements. In the past, I observed a noticeable speedup (6%) for building rustc, but since I've rebased, the numbers appear to be more of a wash: | Crate | Before | After | Percentage | | --- | --- | --- | -- | | syntax | 167s | 166s | 0.6% faster | | rustc | 376s | 382s | 1.5% slower | Some advantages of this new scheme: - `is_sized` etc are proper queries - we get caching across generic fns, so long as trait environment is identical - dependency tracking is correct
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
