Skip to content

First draft at constructing a dependency graph #30393

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

Closed
Closed
Prev Previous commit
Next Next commit
WIP -- librustc_trans -- Fix merge conflict and remove a use of ignor…
…e while we're at it
  • Loading branch information
nikomatsakis committed Dec 15, 2015
commit e05b8c6180969d61bd45a0e50fade02b4a767ec1
1 change: 1 addition & 0 deletions src/librustc/dep_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub enum DepNode {
TransLinkMeta,
TransCrateItem(DefId),
TransInlinedItem(DefId),
TransWriteMetadata,

// Nodes representing bits of computed IR in the tcx. Each of
// these corresponds to a particular table in the tcx.
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_trans/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3060,8 +3060,9 @@ pub fn trans_crate<'tcx>(tcx: &ty::ctxt<'tcx>,
let reachable_symbol_ids = filter_reachable_ids(&shared_ccx);

// Translate the metadata.
let metadata = tcx.dep_graph.with_ignore(|| {
write_metadata(&shared_ccx, krate, &reachable_symbol_ids, mir_map);
let metadata = tcx.dep_graph.with_task(DepNode::TransWriteMetadata, || {
let krate = tcx.map.krate();
write_metadata(&shared_ccx, krate, &reachable_symbol_ids, mir_map)
});

if shared_ccx.sess().trans_stats() {
Expand Down