Skip to content
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

Create dep-node representing the overall trans of each partition #34038

Closed
nikomatsakis opened this issue Jun 2, 2016 · 3 comments
Closed

Create dep-node representing the overall trans of each partition #34038

nikomatsakis opened this issue Jun 2, 2016 · 3 comments
Assignees
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

Right now we have dep-nodes representing the trans for individual items. We should create a dep-node also for each partition. These dep-nodes will not have a DefId but rather the string representing the partition name. They will have incoming edges from the trans of each individual item -- some trans items, such as drop glue, may not have their own individual item and can just be lumped under the partition node.

Upon startup, when the dep-node for a partition is deemed to be dirty, we will also delete the associated .o file from the disk. The same is true if the hash of the partition contents (cc #34037) changes.

One question: could it somehow happen (I don't think so...but maybe?) that a partition just ceases to exist, but none of the inputs change? I guess one example might be changing the partition strategy? We may just want to do a little walk over the graph and delete extra nodes.

cc @michaelwoerister

@nagisa nagisa added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 2, 2016
@michaelwoerister
Copy link
Member

One question: could it somehow happen (I don't think so...but maybe?) that a partition just ceases to exist, but none of the inputs change? I guess one example might be changing the partition strategy? We may just want to do a little walk over the graph and delete extra nodes.

I think that should be covered by the code that deletes partitions when the hash does not match any more. Since the name of old partition would not show up in the new partitioning, the corresponding object file would get deleted at that point.

@nikomatsakis
Copy link
Contributor Author

@michaelwoerister

Since the name of old partition would not show up in the new partitioning, the corresponding object file would get deleted at that point.

This is basically what I meant by doing an extra walk.

@nikomatsakis
Copy link
Contributor Author

Working on this issue now in my branch.

@nikomatsakis nikomatsakis self-assigned this Jun 7, 2016
bors added a commit that referenced this issue Jul 28, 2016
Enable reuse of `.o` files if nothing has changed

This PR completes a first "spike" for incremental compilation by enabling us to reuse `.o` files when nothing has changed. When in incr. mode, we will save `.o` files into the temporary directory, then copy them back out again if they are still valid. The code is still a bit rough but it does seem to work. =)

r? @michaelwoerister

Fixes #34036
Fixes #34037
Fixes #34038
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants