Skip to content

Add replay support for MCCAS in Swift. #74202

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 3 commits into from
Jul 10, 2024

Conversation

rastogishubham
Copy link
Contributor

This patch adds support to be able to replay a cached object file from MCCAS in the swift compiler.

@rastogishubham rastogishubham force-pushed the MCCASReplay branch 3 times, most recently from 156d06a to f894b02 Compare June 7, 2024 05:45
@rastogishubham
Copy link
Contributor Author

@swift-ci please test

@rastogishubham
Copy link
Contributor Author

@swift-ci please test

@rastogishubham
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layering is wrong that you put MCCAS object writing into CachedDiagnostics. You need to find a better place to put it.

@rastogishubham
Copy link
Contributor Author

@swift-ci please test

@rastogishubham
Copy link
Contributor Author

@cachemeifyoucan sorry for getting back on this a little late, but I think I addressed everything

When MCCAS is used, filter the object file from the CASOutputBackend
because we do not want to write the object file in the CAS, we want
to associate the MCCAS top level CAS Object to the main output of the
CASOutputBackend.
This patch stores the MCCAS ObjectRef as the main output of the
CASOutputBackend when MCCAS is enabled.
@rastogishubham
Copy link
Contributor Author

@swift-ci please test

@rastogishubham rastogishubham force-pushed the MCCASReplay branch 2 times, most recently from e359604 to 1d4d211 Compare July 10, 2024 02:04
@rastogishubham
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after addressing the one last comment.

This patch adds support for MCCAS when a cache hit is encountered when
trying to replay a compilation, and uses the MCCAS serialization code
to materialize the object file that is the main output of the
compilation.
@rastogishubham rastogishubham enabled auto-merge July 10, 2024 18:27
@rastogishubham
Copy link
Contributor Author

@swift-ci please test

@rastogishubham rastogishubham disabled auto-merge July 10, 2024 18:27
@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test

@rastogishubham rastogishubham merged commit d443fdd into swiftlang:main Jul 10, 2024
4 of 5 checks passed
@rastogishubham rastogishubham deleted the MCCASReplay branch July 10, 2024 22:21
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.

3 participants