-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[incremental] remove unnecessary passes #41251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@aochagavia expressed interest in this from #40746 |
By the way, in the issue you mention that |
@nikomatsakis I have a commit where I remove 4 of the 5 passes listed here. However, now I am blocked by the following question: The pass in |
Also, the pass in |
Yeah, don't remove nodes used by maps. Those are on-demand queries. |
@eddyb do you have any ideas regarding my second question? |
@aochagavia I think you'd want to call self.with_collect_item_sig(item.id, convert_item);
// becomes
convert_item(self.tcx, item.id); |
@aochagavia argh, just saw your comments here. All resolved? I've been behind on notifications. I wound up accidentally doing some of this work in #41360, actually. Sorry if I stepped on your toes with that. :( |
@nikomatsakis There is indeed some overlap, so I will have to rebase once your changes land. On the other hand, if changes need to happen fast here maybe I could work on other parts of the compiler (for instance, this issue) |
@nikomatsakis All the items in the issue are marked off, does that indicate this is done? If not, maybe OP should be updated with more items or a note added that there are more issues as well. |
I think this is done -- @aochagavia, you agree? |
@nikomatsakis I don't understand the question. What should I agree on? If this is done, it is done, right? |
@aochagavia true. =) I'm not sure precisely what I was asking for. (I guess if you had noticed anything I overlooked, but if so, we'll find it sooner or later...) |
This is a sub-issue of #40746. The follow list of tasks are all executed for side-effects. I believe they can all be straight-up removed (that is, we just don't create a task at all). The idea is to remove the call to
with_task
orin_task
as well as the associatedDepNode
variant and see what happens -- if you get assertion failures, it may mean that they are writing to shared state, in which case we'll want to keep the task and refactor it in some other way.An example PR is #41063. See e.g. the first commit which removed the
CheckLoops
stuff.src/librustc_passes/loops.rs:53: let _task = map.dep_graph.in_task(DepNode::CheckLoops);
src/librustc_passes/static_recursion.rs:91: let _task = hir_map.dep_graph.in_task(DepNode::CheckStaticRecursion);
src/librustc_borrowck/borrowck/mod.rs:64: tcx.dep_graph.with_task(DepNode::BorrowCheckKrate, tcx, (), check_crate_task);
src/librustc/middle/effect.rs:244: let _task = tcx.dep_graph.in_task(DepNode::EffectCheck);
src/librustc/middle/liveness.rs:199: let _task = tcx.dep_graph.in_task(DepNode::Liveness);
src/librustc_typeck/check_unused.rs:65: let _task = tcx.dep_graph.in_task(DepNode::UnusedTraitCheck);
src/librustc/middle/dead.rs:597: let _task = tcx.dep_graph.in_task(DepNode::DeadCheck);
AccessLevels
query described elsewheresrc/librustc_typeck/coherence/mod.rs:135: let _task = tcx.dep_graph.in_task(DepNode::Coherence);
src/librustc_typeck/coherence/overlap.rs:42: tcx.dep_graph.in_task(DepNode::CoherenceOverlapCheck(trait_def_id));
src/librustc_typeck/collect.rs:171: self.tcx.dep_graph.with_task(DepNode::CollectItemSig(def_id), self.tcx, id, op);
The text was updated successfully, but these errors were encountered: