* [SILOptimizer] Add prespecialization for arbitray reference types
* Fix benchmark Package.swift
* Move SimpleArray to utils
* Fix multiple indirect result case
* Remove leftover code from previous attempt
* Fix test after rebase
* Move code to compute type replacements to SpecializedFunction
* Fix ownership when OSSA is enabled
* Fixes after rebase
* Changes after rebasing
* Add feature flag for layout pre-specialization
* Fix pre_specialize-macos.swift
* Add compiler flag to benchmark build
* Fix benchmark SwiftPM flags
The logic here was apparently intended to omit literal zeros from deltas
to save a few bytes, but it instead drops all zeros from all columns.
Remove the condition that drops zeros in order to avoid confusing
the many scripts that consume this data.
Alternatives Considered
I'm probably going to entirely drop the delta form in an upcoming
PR, so I didn't think it was worthwhile to do something more complex,
such as:
* Fixing this logic to only omit zeros from actual delta columns
* Rewriting all the client scripts to treat any empty column as zero
* Add benchmarks that measure KeyPath read and write performance.
* Added setUpFunctions. Revised number of iterations per benchmark.
* Include n as a factor in the number of iterations.
* Increased number of iterations for KeyPathDirectAccess by a factor of 25.
* One last tweak to the number of iterations on testDirectAccess to get them above 20 us.
* Made revisions based on feedback. Added three new benchmarks.
* Added benchmarks to exhaustively benchmark all KeyPathComponent types. Removed benchmarks dealing with an inlining issue.
* Wrapped additional keypaths with identity() where needed. More cleanup and documentation.
* Moved KeyPaths for KeyPathRead and Write into FixedSizeArrayHolder. Renamed GetSet to Getset.
* Added inline(never) to both versions of getKeypathToElement().
* Moved identity() wraps so that they're called once per variable per benchmark.
* Moving destinationKeyPaths into FixedSizeArrayHolder to try to reduce long setup overhead errors.
* Additional moving of the identity() wrapping into the singleton's init() to try to reduce setup time errors.
The script defaulted to a mode that no one uses without checking
whether the input was compatible with that mode.
This is the script used for run-to-run comparison of benchmark
results. The in-tree benchmarks happened to work with the script only
because of a fragile string comparison burried deep within the
script. Other out-of-tree benchmark scripts that generate results were
silently broken when using this script for comparison.
Function bodies of `blackHole`, `identity`, etc. must not be visible in the benchmark modules.
Enabling CMO by default broke this. Since then we need to explicitly exclude those functions from cross-module-optimization.
The `__future__` we relied on is now, where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):
* absolute_import
* print_function
* unicode_literals
* division
These import statements are no-ops and are no longer necessary.
When using libc++, Swift imports `size_t` as Int despite `size_t` being an unsigned type. This is intentional & is specified in `lib/ClangImporter/MappedTypes.def`. Previously, MappedTypes were only honored for C/C++ types declared on the file level.
In libstdc++, `size_t` is declared within `namespace std` and not on the file level, so the mapping to Int was not applied.
This change ensures that MappedTypes are also applied to types declared in `namespace std`.