Skip to content

incr.comp.: Implement "eval-always" queries #45238

Closed
@michaelwoerister

Description

@michaelwoerister

For each query invocation the query system will track which other queries have been invoked by the former. We collect this data in the DepGraph and use it to find which queries need to be re-executed in a subsequent compilation session. However, there are some queries (like collect_and_partition_translation_items for example) that access pretty much everything in the current crate and therefore:

  • will introduce a lot of dependency edges in the graph, while at the same time
  • are very likely to be re-executed if there is even a small change to the code base.

We can take advantage of this domain knowledge by introducing so-called "eval-always" queries. This is a special kind of query where we opt into super coarse-grained dependency tracking: Instead of recording each individual read-edge, we just record a single read to DepNode::Krate. This has the effect that any change will make this query be re-executed.

Note that it is not entirely clear how much of a performance win this can provide but it's certainly interesting to test out.

There are a few steps to implementing this:

Feel free to come up with a better name for "eval-always". It's really not a good name :)

cc @wesleywiser @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.WG-incr-compWorking group: Incremental compilation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions