Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
|
|
| } | ||
|
|
||
| pub type Storage<'tcx> = | ||
| pub type QueryCache<'tcx> = |
There was a problem hiding this comment.
I definitely agree with renaming Storage.
Because this is macro-heavy code, I place a very high priority on having distinct names for things, both to make searching easier and less noisy, and to make it easier to keep things distinct in my mind without IDE-hover assistance.
For that reason I would prefer something unique, even if it's less elegant. Thankfully we only need to see it in a few places.
Perhaps QueryCacheImpl? I don't love it, but it's unique, and feels suitably connected to the QueryCache trait without actually colliding.
| #[derive(Copy, Clone, Debug)] | ||
| pub struct LocalCrate; | ||
|
|
||
| pub trait QueryKeyBounds = Copy + Debug + Eq + Hash + for<'a> HashStable<StableHashingContext<'a>>; |
There was a problem hiding this comment.
Remark: This is a nice little trick for repetitive bounds.
|
I like all of this, including the last two. My only quibble is wanting to find a unique replacement for |
|
We could just use |
Yeah, that sounds like a reasonable choice. It's less searchable than r=me with |
eb743fd to
ef7aa68
Compare
|
I changed to @bors r=Zalathar rollup |
This comment has been minimized.
This comment has been minimized.
It's currently in `dep_node.rs`, along with a blanket impl. Specific impls are in `dep_node_key.rs`. This commit moves the trait and the blanket impl into `dep_node_key.rs`, so everything is in one place.
Because `Key` is extremely generic and hard to search for. Also rename `LocalKey` and `AsLocalKey` similarly, for consistency.
We have two traits governing query keys, for no particular reason. This commit combines them.
Because `Storage` is a vague name that I've never liked.
ef7aa68 to
9ba101f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I rebased. @bors r+ |
…thercote Query key cleanups The first three commits are simple. The last two are a bit more opinionated, see what you think. r? @Zalathar
…uwer Rollup of 7 pull requests Successful merges: - #153079 (Revert "Move aarch64-apple dist builder to dynamic llvm linking") - #152651 (Avoid duplicate `requirement` diag args in `RegionOriginNote`) - #152978 (Port `#[rustc_autodiff]` to the attribute parser infrastructure) - #153091 (Migration of `LintDiagnostic` - part 4) - #153112 (Query key cleanups) - #153118 (mailmap: add redddy) - #153120 (Clean up some code related to `QueryVTable::execute_query_fn`)
|
@rust-timer build f07a639 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (f07a639): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 480.132s -> 481.144s (0.21%) |
The first three commits are simple. The last two are a bit more opinionated, see what you think.
r? @Zalathar