1
Fork 0

Rollup merge of #76724 - ecstatic-morse:dataflow-pass-names, r=lcnr

Allow a unique name to be assigned to dataflow graphviz output

Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.
This commit is contained in:
Jonas Schievink 2020-09-25 02:29:31 +02:00 committed by GitHub
commit d766c239bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 4 deletions

View file

@ -205,6 +205,7 @@ fn do_mir_borrowck<'a, 'tcx>(
let mut flow_inits = MaybeInitializedPlaces::new(tcx, &body, &mdpe)
.into_engine(tcx, &body, def.did.to_def_id())
.pass_name("borrowck")
.iterate_to_fixpoint()
.into_results_cursor(&body);
@ -264,12 +265,15 @@ fn do_mir_borrowck<'a, 'tcx>(
let flow_borrows = Borrows::new(tcx, &body, regioncx.clone(), &borrow_set)
.into_engine(tcx, &body, def.did.to_def_id())
.pass_name("borrowck")
.iterate_to_fixpoint();
let flow_uninits = MaybeUninitializedPlaces::new(tcx, &body, &mdpe)
.into_engine(tcx, &body, def.did.to_def_id())
.pass_name("borrowck")
.iterate_to_fixpoint();
let flow_ever_inits = EverInitializedPlaces::new(tcx, &body, &mdpe)
.into_engine(tcx, &body, def.did.to_def_id())
.pass_name("borrowck")
.iterate_to_fixpoint();
let movable_generator = match tcx.hir().get(id) {