forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #2431
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds standard conventions for Vim filetype plugins: - Allows users to opt out of using the provided ftplugin file, if they choose to install and use another set of runtime files for Swift (which offers its own version of ftplugin for Swift), It also prevents this ftplugin file from being sourced again if a ftplugin file for Swift was already sourced. Vim's documentation on this recommends offering users this option as well, under the "DISABLING" section of `:help write-filetype-plugin`). - Adds the `b:undo_ftplugin` buffer local variable, which is used to undo the filetype settings when the `:setfiletype` command is used (See :help `undo_ftplugin`). Also prefer using the full names for Vim settings instead of short ones as they are more readable. The above conventions are in place in many of the ftplugin files shipped with Vim, so they can be used as a reference, as well.
In some cases when building the `XAudio` module, we would end up going down C++ paths: ``` C:\Program Files (x86)\Windows Kits\10\/Include/10.0.17763.0/um/xaudio2.h:61:26: error: 'uuid' attribute is not supported in C interface __declspec(uuid("2B02E3CF-2E0B-4ec3-BE45-1B2A3FE7210D")) IXAudio2; ^ <module-includes>:29:10: note: in file included from <module-includes>:29: ^ ``` Although this works with newer SDKs, it does not work with older SDKs. Filter out the module for the time being with a requirement on `C++`. This should be possible to use with `-enable-cxx-interop`.
This becomes tricky with the new per-request cache representation. We can add it back later if we need it, but I feel like this code path isn't particularly useful right now anyway.
This is based on an earlier patch by @hamishknight. The idea is that instead of caching results in a single DenseMap that maps AnyRequest to AnyValue, we instead define a separate DenseMap for each request kind that directly uses the request as the key, and the request value as the value. This avoids type erasure and memory allocation overhead arising from the use of AnyRequest and AnyValue. There are no remaining usages of AnyValue, and the only usage of AnyRequest is now in the reference dependency tracking, which can be refactored to use a similar strategy of storing per-request maps as well.
... instead of passing around an ActiveRequest.
Just as with the result cache, instead of a single DenseMap with type-erased AnyRequest keys, we can use per-request maps for a nice performance improvement.
Canonicalizing OSSA provably minimizes the number of retains and releases within the boundaries of that lifetime. This eliminates the need for ad-hoc optimization of OSSA copies. This initial implementation only canonicalizes owned values, but canonicalizing guaranteed values is a simple extension. This was originally part of the CopyPropagation prototype years ago. Now OSSA is specified completely enough that it can be turned into a simple utility instead. CanonicalOSSALifetime uses PrunedLiveness to find the extended live range and identify the consumes on the boundary. All other consumes need their own copy. No other copies are needed. By running this after other transformations that affect OSSA lifetimes, we can avoid the need to run pattern-matching optimization to SemanticARC to recover from suboptimal patterns, which is not robust, maintainable, or efficient.
MandatoryCopyPropagation must be a separate pass in order to preserve all debug_value instructions. CopyPropagation cannot preserve debug_value because, as a rule, debug information cannot affect -O behavior.
@actorIndependent is needed on declarations outside of actors to (e.g.) disable inference of a global actor. It is also effectively the default, so allow it to be specified explicitly.
If a guaranteed value is not a recognized and handled borrow introducer, then treat the copy as a separate owned live range.
…endent [Concurrency] Loosen constraints on @actorIndependent placement.
Add a CanonicalOSSALifetime utility
[SR-13753][Diagnostics] Downgrade l-value unused diagnostics to warning
OS X -> macOS
CMake: fix build for Apple Silicon hosts When building with `build-script` using these arguments ``` utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "arm64" --sccache --release-debuginfo --test ``` the build fails with ``` ninja: error: 'stdlib/swift-test-stdlib-macosx-x86_64', needed by 'stdlib/CMakeFiles/swift-test-stdlib', missing and no known rule to make it ``` I think that the "Getting Started" guide should avoid hardcoding `x86_64` arguments, and suggest using `$(uname -m)` instead. `SWIFT_PRIMARY_VARIANT_ARCH_default` could also get its value from `CMAKE_HOST_SYSTEM_PROCESSOR` in the root `CMakeLists.txt`. Resolves SR-13943.
…untimes. rdar://72856188
Conform to existing conventions for Vim ftplugin
Fix a misspelling
…entialMetatypeClarification
Platform: add a `cplusplus` requirement to XAudio
Per-request caches and dependency maps
Enable ArrayCountPropagation on OSSA
…nce-collision-test-back-deployment
…Xcode-toolchain-Python-executables Revert "[build] Use Xcode toolchain Python executables"
kateinoigakukun
approved these changes
Jan 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )