Skip to content

[IRGen] Fix non-deterministic requests in addAbstractForFulfillments() #80370

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

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

cachemeifyoucan
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan commented Mar 28, 2025

In addAbstractForFulfillments(), FulfillmentMap (DenseMap) is iterated to compute all the cache entries. Even the non-deterministic iteration order doesn't affect the computed cache entries, the requests to the evaluator during the process will be in non-deterministic order. This will cause the fine-grain dependency file generated to be non-deterministic. Use a MapVector to make sure iteration order is deterministic.

rdar://147971980

In `addAbstractForFulfillments()`, FulfillmentMap (DenseMap) is
iterated to compute all the cache entries. Even the
non-deterministic iteration order doesn't affect the computed cache
entries, the requests to the evaluator during the process will be in
non-deterministic order. This will cause the fine-grain dependency file
generated to be non-deterministic. Use a `MapVector` to make sure
iteration order is deterministic.

rdar://147971980
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit e132e1c into swiftlang:main Mar 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants