Skip to content

Disambiguate expansions relative to the creating DepNode#111815

Closed
cjgillot wants to merge 10 commits intorust-lang:masterfrom
cjgillot:dep-node-disambiguate
Closed

Disambiguate expansions relative to the creating DepNode#111815
cjgillot wants to merge 10 commits intorust-lang:masterfrom
cjgillot:dep-node-disambiguate

Conversation

@cjgillot
Copy link
Contributor

@cjgillot cjgillot commented May 21, 2023

Expansion data requires to be disambiguated in case of colliding spans. The current disambiguation mechanism was merely looking at hash collisions using a global disambiguation counter.

This global counter created an untracked data dependency between unrelated queries. For instance here: #110457 (comment)

This PR replaces the global disambiguation map by a per-DepNode map. This requires threading the currently evaluated DepNode through the implicit context. We use a dummy in the non-incremental case to simplify the logic.

Loading
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) perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants