Skip to content

[Dependency Scanning] Add a binary serialization format for the Inter-Module Dependencies Cache #37585

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
Jun 1, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 21, 2021

  • Adds serialization format based on the LLVM Bitcode File Format (https://llvm.org/docs/BitCodeFormat.html).
  • Adds Serialization and Deserialization code.
  • Adds frontend options to save and load the cache contents from the scanner.
  • Adds frontend option to run a dependency scan with a serialization round-trip test.

This PR only introduces the serialization format and code, enabling the scanner to perform a scan while reusing a previously-saved cache contents will require additional changes that will come as a followup, I wanted to keep the scope of this PR to serialization itself.

…-Module Dependencies Cache

- Adds serialization format based on the LLVM Bitcode File Format (https://llvm.org/docs/BitCodeFormat.html).
- Adds Serialization and Deserialization code.
@artemcm artemcm requested review from xymus and nkcsgexi May 21, 2021 21:36
@artemcm
Copy link
Contributor Author

artemcm commented May 24, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented May 25, 2021

@swift-ci please test Windows platform

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented May 26, 2021

@swift-ci please test Windows platform

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Discussed with @artemcm offline about this change. It seems to be a necessary addition for caching dependency scanning results.

artemcm added a commit to artemcm/swift that referenced this pull request May 26, 2021
…serialize and deserialize dependency scanner cache from a `.moddepcache` file.

Using the serialization format added in swiftlang#37585.

- Add load/save code for the `-scan-dependencies` code-path.
- Add `libSwiftDriver` entry-points to load/store the cache of a given scanner instance.
@artemcm
Copy link
Contributor Author

artemcm commented Jun 1, 2021

@swift-ci please test

@artemcm artemcm merged commit 23fcb49 into swiftlang:main Jun 1, 2021
artemcm added a commit to artemcm/swift that referenced this pull request Jun 1, 2021
…serialize and deserialize dependency scanner cache from a `.moddepcache` file.

Using the serialization format added in swiftlang#37585.

- Add load/save code for the `-scan-dependencies` code-path.
- Add `libSwiftDriver` entry-points to load/store the cache of a given scanner instance.
artemcm added a commit to artemcm/swift that referenced this pull request Jul 30, 2021
…serialize and deserialize dependency scanner cache from a `.moddepcache` file.

Using the serialization format added in swiftlang#37585.

- Add load/save code for the `-scan-dependencies` code-path.
- Add `libSwiftDriver` entry-points to load/store the cache of a given scanner instance.
@artemcm artemcm deleted the SerializeModuleDepCache branch December 16, 2022 17:37
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