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

DepNodeIndex does not uniquely identify anonymous queries #85688

Open
cjgillot opened this issue May 25, 2021 · 2 comments
Open

DepNodeIndex does not uniquely identify anonymous queries #85688

cjgillot opened this issue May 25, 2021 · 2 comments
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-self-profile Area: Self-profiling feature of the compiler T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@cjgillot
Copy link
Contributor

The DepNodeIndex for an anonymous query is computed from its DepKind and from the list of dependencies, but does not depend on its key. As DepNodes are deduplicated before creation, the same DepNodeIndex can correspond to multiple anonymous query invocations.

Query self-profiling relies on DepNodeIndex to identify query invocations.

The consequences of this deduplication on self-profiling need further investigation.

cc @michaelwoerister

@jyn514
Copy link
Member

jyn514 commented May 25, 2021

What is an anonymous query?

@wesleywiser wesleywiser added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-self-profile Area: Self-profiling feature of the compiler labels May 25, 2021
@michaelwoerister
Copy link
Member

@jyn514 See also https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation-in-detail.html#query-modifiers

Right now it is also used as a way to speed up the erase_regions_ty query but I think it's debatable whether that's a good idea.

@Enselic Enselic added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-self-profile Area: Self-profiling feature of the compiler 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

5 participants