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

[6.0][Caching] Add fast swift instance setup for cache replay #73305

Merged

Conversation

cachemeifyoucan
Copy link
Contributor

  • Explanation: add a fast path for swift compiler instance setup when replay cached result.
  • Scope: this allows fast replay without expensive input construction from built system
  • Original PR: [Caching] Add fast swift instance setup for cache replay #73265
  • Issue: rdar://127062609
  • Risk: Low. Performance improvement for swift caching.
  • Testing: Correct test already covered by existing tests
  • Reviewer: @benlangmuir

Add a fast path to create swift CompilerInstance when it is only used to
replay output when there is a cache hit. The normal `setup` function is
very expensive to call, especially in cache mode to setup inputs, and it
needs to be called once per input file from libSwiftScan API due to the
current caching granularity.

The fast path will only construct the part that is needed for output
replay, including the CAS, the output backend and caching diagnostic
processor.

rdar://127062609
(cherry picked from commit facfe45)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner April 26, 2024 23:38
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan merged commit 56e1fee into apple:release/6.0 Apr 29, 2024
5 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.

None yet

2 participants