Skip to content

Commit

Permalink
Add more self-profile info to rustc_resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Jan 21, 2021
1 parent 65767e5 commit 5f74ab4
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions compiler/rustc_resolve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,16 +1465,14 @@ impl<'a> Resolver<'a> {

/// Entry point to crate resolution.
pub fn resolve_crate(&mut self, krate: &Crate) {
let _prof_timer = self.session.prof.generic_activity("resolve_crate");

ImportResolver { r: self }.finalize_imports();
self.finalize_macro_resolutions();

self.late_resolve_crate(krate);

self.check_unused(krate);
self.report_errors(krate);
self.crate_loader.postprocess(krate);
self.session.time("resolve_crate", || {
self.session.time("finalize_imports", || ImportResolver { r: self }.finalize_imports());
self.session.time("finalize_macro_resolutions", || self.finalize_macro_resolutions());
self.session.time("late_resolve_crate", || self.late_resolve_crate(krate));
self.session.time("resolve_check_unused", || self.check_unused(krate));
self.session.time("resolve_report_errors", || self.report_errors(krate));
self.session.time("resolve_postprocess", || self.crate_loader.postprocess(krate));
});
}

pub fn traits_in_scope(
Expand Down

0 comments on commit 5f74ab4

Please sign in to comment.