Skip to content

Use DefPathHash instead of HirId to break inlining cycles.#85321

Merged
bors merged 3 commits intorust-lang:masterfrom
cjgillot:mir-cycle
Apr 3, 2022
Merged

Use DefPathHash instead of HirId to break inlining cycles.#85321
bors merged 3 commits intorust-lang:masterfrom
cjgillot:mir-cycle

Conversation

@cjgillot
Copy link
Contributor

The DefPathHash is stable across incremental compilation sessions, so provides a total order on LocalDefId. Using it instead of HirId ensures the MIR inliner has the same behaviour for incremental and non-incremental compilation.

A downside is that the cycle tie break is not as predictable is with HirId.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-mir-opt-inlining Area: MIR inlining merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.