Stream: t-compiler

Topic: incremental comp Q's


pnkfelix (Sep 17 2019 at 11:45, on Zulip):

hey @mw I figured I might as well ask some questions out in the open

pnkfelix (Sep 17 2019 at 11:45, on Zulip):

i've been using the case of recompiling an unchanged source tree as an initial point for better understanding the incr comp code, specifically dep-graph

pnkfelix (Sep 17 2019 at 11:46, on Zulip):

I had mentioned to you earlier that we unconditionally emit the dep graph on every compile, regardless of whether the input changed.

pnkfelix (Sep 17 2019 at 11:47, on Zulip):

We do have the previous serialized graph already loaded, so I looked into comparing the serialized current graph and the previous one. Interestingly, they differ. Does that surprise you, @mw ?

pnkfelix (Sep 17 2019 at 11:48, on Zulip):

(I have not yet exactly dissected the manner in which they differ; all I mean right now is that the in-memory graph representation differs. I'm hopeful that the abstract dep-graphs they each represent is in fact the same, but I have not yet confirmed that.)

pnkfelix (Sep 17 2019 at 11:55, on Zulip):

(if I had parallel_compiler turned on, then of course the order of insertions and thus the assigned indices for the dep-nodes would differ. But I don't think my testing configuration has parallel_compiler turned on.)

mw (Sep 17 2019 at 12:40, on Zulip):

the representations are tailored for their respective purpose

mw (Sep 17 2019 at 12:41, on Zulip):

i.e. the current dep-graph is set up in a way that allows for building it quickly

pnkfelix (Sep 17 2019 at 12:41, on Zulip):

sure, but post converting the current graph to its serialized form

mw (Sep 17 2019 at 12:41, on Zulip):

and the serialized dep-graph should require little post-processing after loading

pnkfelix (Sep 17 2019 at 12:41, on Zulip):

that is, i'm just talking about comparing two instances of SerializedDepGraph

mw (Sep 17 2019 at 12:42, on Zulip):

there are a few things that differ because not everything is a proper query

pnkfelix (Sep 17 2019 at 12:42, on Zulip):

but it sounds like you are not surprised to hear they differ

mw (Sep 17 2019 at 12:43, on Zulip):

there's this mostly: https://github.com/rust-lang/rust/blob/5670d048c0f88af9976b5505c7853b23dd06770d/src/librustc/dep_graph/graph.rs#L956-L967

pnkfelix (Sep 17 2019 at 12:43, on Zulip):

ah I missed that

mw (Sep 17 2019 at 12:44, on Zulip):

it's easy to miss :)

Last update: Nov 16 2019 at 02:00UTC