resolve: Eagerly feed closure visibilities#119136
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
resolve: Eagerly feed closure visibilities Addresses rust-lang#118657 (comment)
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5b028d4): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 673.86s -> 672.275s (-0.24%) |
Also factor out all tcx-dependent operations performed for every created definition into `TyCtxt::create_def`
48e311f to
5e5d82e
Compare
| let feed = TyCtxtFeed { tcx: self.tcx, key }; | ||
| feed.def_kind(def_kind); | ||
| let feed = self.tcx.feed_local_def_id(def_id); | ||
| feed.def_span(self.span); |
There was a problem hiding this comment.
Why is this span not simply passed to create_def?
There was a problem hiding this comment.
This span is not available in resolver right now, it will be passed when the FIXME (#119136 (comment)) is addressed.
| @@ -1225,10 +1225,7 @@ impl<'tcx> Resolver<'_, 'tcx> { | |||
| ); | |||
|
|
|||
| // FIXME: remove `def_span` body, pass in the right spans here and call `tcx.at().create_def()` | |||
There was a problem hiding this comment.
Yes, #118633 is trying to address it, but there are some complications.
|
@bors r=WaffleLapkin |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (8fca829): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 673.565s -> 674.047s (0.07%) |
…=WaffleLapkin Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def` oversight from rust-lang#119136 Not actually an issue, because all uses of `tcx.create_def` were in the resolver, which is `eval_always`, but still good to harden against future uses of `create_def` cc `@petrochenkov` `@WaffleLapkin`
Rollup merge of rust-lang#121084 - oli-obk:create_def_forever_red2, r=WaffleLapkin Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def` oversight from rust-lang#119136 Not actually an issue, because all uses of `tcx.create_def` were in the resolver, which is `eval_always`, but still good to harden against future uses of `create_def` cc `@petrochenkov` `@WaffleLapkin`
…=WaffleLapkin Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def` oversight from rust-lang#119136 Not actually an issue, because all uses of `tcx.create_def` were in the resolver, which is `eval_always`, but still good to harden against future uses of `create_def` cc `@petrochenkov` `@WaffleLapkin`
Rollup merge of rust-lang#121084 - oli-obk:create_def_forever_red2, r=WaffleLapkin Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def` oversight from rust-lang#119136 Not actually an issue, because all uses of `tcx.create_def` were in the resolver, which is `eval_always`, but still good to harden against future uses of `create_def` cc `@petrochenkov` `@WaffleLapkin`
Also factor out all tcx-dependent operations performed for every created definition into
TyCtxt::create_def.Addresses #118657 (comment)